Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
297 commits
Select commit Hold shift + click to select a range
6fe643a
Decent match on AMR Sim Interval Check
Fierydemise Aug 16, 2016
ddb78ff
- fix blade flurry damage replication list
confusingbits Aug 16, 2016
c67494f
-talent ranking
confusingbits Aug 17, 2016
22e514b
Update Sub Model
Fierydemise Aug 17, 2016
3620eb5
Removed APS Print
Fierydemise Aug 17, 2016
eb7d49c
Fix Shuriken Storm Rotations
Fierydemise Aug 17, 2016
635c352
Add Feast Buff
Fierydemise Aug 17, 2016
029220a
- quick, check it in before it breaks again!
confusingbits Aug 17, 2016
12883ee
Update Human Racial
Fierydemise Aug 17, 2016
a2af91d
Trait Updates
Fierydemise Aug 18, 2016
380f8d9
Merge branch 'outlawscriptupdate' of https://github.com/WaveFunctionP…
Fierydemise Aug 18, 2016
afd5bf2
Merge branch 'WaveFunctionP-outlawscriptupdate' into legion
Fierydemise Aug 18, 2016
2bac2f9
- more asn cleanup
confusingbits Aug 18, 2016
6f57125
- final cleanup for asn
confusingbits Aug 23, 2016
23634a6
Update Settings Object
Fierydemise Aug 23, 2016
18ddd41
- talent ranking format changed
confusingbits Aug 25, 2016
602893f
- refactor get_talents_ranking
confusingbits Aug 25, 2016
cbf28f2
- handle damage proc scaling
confusingbits Aug 28, 2016
9df482d
- first pass heroic trinkets
confusingbits Aug 29, 2016
1839d43
Sub Model Updated for New Settings
Fierydemise Aug 29, 2016
527a1b8
-first pass raid trinkets
confusingbits Aug 29, 2016
eed5d78
Replace avg_evis_cps with finisher_threshold
Fierydemise Aug 29, 2016
eec630a
Plumb positional_uptime Setting
Fierydemise Aug 29, 2016
10c6c61
-profession trinkets
confusingbits Aug 29, 2016
c889fdf
-neck enchant procs
confusingbits Aug 29, 2016
4c000b1
-fix mark_of_the_hidden_satyr
confusingbits Aug 29, 2016
c406612
Outlaw Model SnD
Fierydemise Aug 29, 2016
28f1f05
Outlaw RtB Model
Fierydemise Aug 29, 2016
a955f15
Fix Divide by Zero with RtB thresholds
Fierydemise Aug 29, 2016
0a77ac9
Fix Fortunes Boon and Fortune Strikes
Fierydemise Aug 29, 2016
77b3c37
Merge pull request #10 from WaveFunctionP/trinket
Fierydemise Aug 29, 2016
3c2488f
Outlaw Done For Now
Fierydemise Aug 29, 2016
12b0498
Merge branch 'outlawscriptupdate' of https://github.com/WaveFunctionP…
Fierydemise Aug 29, 2016
3320543
Merge branch 'TalentRankingRevamp' of https://github.com/WaveFunction…
Fierydemise Aug 29, 2016
ee2fd95
Merge branch 'WaveFunctionP-TalentRankingRevamp' into legion
Fierydemise Aug 29, 2016
c7d3b42
Assassination Model With NYI
Fierydemise Aug 30, 2016
c0fbd06
Fix Proc crash with Rupture
Fierydemise Aug 30, 2016
0894cb1
Fix Death From Above handling
Fierydemise Aug 30, 2016
7cdcf44
By Hand Path Enumeration
Fierydemise Aug 30, 2016
b9a4d5a
Many Assn Talents and Traits Implmented
Fierydemise Aug 30, 2016
61b52e8
Fix Ghostly Strike and DfA Implementation
Fierydemise Sep 16, 2016
521c317
Update Outlaw Model:
Fierydemise Sep 21, 2016
b063c19
Overhaul: Purge much of the old test suite, green what's left
cheald Sep 21, 2016
e4a1d90
Remove rawinput() to allow suite to run
cheald Sep 21, 2016
ba65e0e
Set up tests for single and multi-target for each spec
cheald Sep 21, 2016
cc02671
Add test invocations to readme
cheald Sep 22, 2016
c8e6dc9
Merge pull request #18 from cheald/legion-fix-tests
Fierydemise Sep 22, 2016
ebd46e8
Add simple tests to verify that Outlaw traits improve DPS
cheald Sep 22, 2016
1b78c5f
Include finisher_threshold setting
cheald Sep 22, 2016
994d087
Fix black powder test, add tests for blade flurry/blade dancer behavior
cheald Sep 22, 2016
0951cb5
minor refactor: add compare_dps method
cheald Sep 22, 2016
8f75cd3
Test multiple ranks of artifact traits
cheald Sep 22, 2016
9d440ca
Add talent ranking tests for tiers 1, 3, 6, 7
cheald Sep 22, 2016
f6a415e
Refactoring
cheald Sep 23, 2016
d39b8b0
Minor: Comment cleanup
cheald Sep 23, 2016
298f1a1
Fix Blade Flurry tests
cheald Sep 23, 2016
584db96
Merge pull request #19 from cheald/outlaw-artifact-tests
Fierydemise Sep 26, 2016
939a2f8
Fix talents ranking; reset talents to baseline before performing rank…
cheald Sep 29, 2016
8afca5d
Reset talents on initialization
cheald Sep 30, 2016
0615ab0
Merge pull request #21 from cheald/fix-talent-comparison
Fierydemise Sep 30, 2016
344cc03
Fix Exsang Garotte Handling
Fierydemise Oct 3, 2016
89b0512
Merge branch 'legion' of https://github.com/Fierydemise/ShadowCraft-E…
Fierydemise Oct 3, 2016
a007a74
Initial Curse of the Dreadblades and MfD Handling
Fierydemise Oct 3, 2016
5d8cbdf
Removed debug output
Fierydemise Oct 3, 2016
54cd8f8
Fix talent tests; talents are 1-indexed, not 0-indexed
cheald Oct 3, 2016
fdebd95
Outlaw merge_aps no doesn't modify underlying distribution
Fierydemise Oct 3, 2016
2921436
Merge pull request #22 from cheald/fix-talent-tests
Fierydemise Oct 3, 2016
ad31947
Update Finality Mechanic
Fierydemise Oct 4, 2016
0ea8036
Damage hotfixes 9/23
Fierydemise Oct 5, 2016
fc7b495
Hackish fix for subtlety haste-spike bug.
Fierydemise Oct 6, 2016
dd4d63e
Update Agonizing Poison Mechanics
Fierydemise Oct 13, 2016
7081f93
New Subtlety Setting and Modified Assn Script
Fierydemise Oct 21, 2016
9655348
Bag of Tricks implemented
Fierydemise Oct 21, 2016
559e87d
Merge branch 'legion' of git+ssh://github.com/Fierydemise/ShadowCraft…
Fierydemise Oct 21, 2016
8a9c35b
From The Shadows implemented
Fierydemise Oct 21, 2016
2ee683c
Shadow Satyr's Walk implemented
Fierydemise Oct 21, 2016
59b0a02
Fix Agonizing Poison Formula
Fierydemise Oct 22, 2016
43a6ad7
Version bump
Fierydemise Oct 22, 2016
c955e8a
Removed Mark of Shattered Hand DOT
Fierydemise Oct 22, 2016
a7a66ee
Fix bag of tricks with alacrity
Fierydemise Oct 23, 2016
68b3530
Add support for Jacin's Ruse set bonus
Oct 31, 2016
4f7e31e
Merge pull request #25 from timwoj/legion
Fierydemise Nov 3, 2016
3275878
March of the Legion 2pc
Fierydemise Nov 4, 2016
653f6b1
Dreadlord's Deceit Added
Fierydemise Nov 4, 2016
f8cab33
Added Modifier Object for Damage Modifier Handling
Fierydemise Nov 29, 2016
89f8aca
Modifiers Whitelist by Default, also Documentation
Fierydemise Nov 30, 2016
c25123d
Fix calculation of shadow_nova breakdown with boss_adds > 0
Dec 11, 2016
8c5bae6
Merge pull request #26 from timwoj/legion
Fierydemise Dec 11, 2016
762bb10
Fix shadow_nova again
Jan 6, 2017
43090e5
Merge pull request #27 from timwoj/legion
Fierydemise Jan 6, 2017
f3f0318
New Modifier System Added for Sub and Assn
Fierydemise Jan 13, 2017
775a812
Documented 7.1.5 Changes for Assn and Sub
Fierydemise Jan 16, 2017
a6454f8
Merge branch 'legion' of git+ssh://github.com/Fierydemise/ShadowCraft…
Fierydemise Jan 16, 2017
7c82776
Sub has Shuriken Storm not FoK
Fierydemise Jan 16, 2017
74c5d6f
Assorted Sub Fixes
Fierydemise Jan 16, 2017
542d8a8
BotA isn't a dps loss
Fierydemise Jan 17, 2017
f16a0bf
Assassination and Subtlety Set Bonuses
Fierydemise Jan 21, 2017
dd05bd2
Legendary Infrstructure and Zoldyks's Implemented
Fierydemise Jan 21, 2017
ca60f6a
Fix Missing Parens in Final Trait
Fierydemise Jan 24, 2017
44e1fcb
Fix Zoldyk's I think
Fierydemise Jan 24, 2017
41272d8
Update Assn Script
Fierydemise Jan 25, 2017
aecce30
Final Trait Can be 2 Digits
Fierydemise Jan 25, 2017
f8c48c1
Updated Subtlety Test Script
Fierydemise Jan 25, 2017
508a57c
7.1.5 stat scaling
Mystler Feb 17, 2017
e8fb8f7
Fortune's Boon and Master Assassin CDR
Mystler Feb 17, 2017
df69d8e
Aiming for 7.1.5 by now
Mystler Feb 17, 2017
2bdc5c0
Merge pull request #28 from Mystler/minor-changes
Fierydemise Feb 17, 2017
6696f31
Insignia of Ravenholdt
Mystler Feb 19, 2017
98689d0
Merge pull request #29 from Mystler/insignia
Fierydemise Feb 19, 2017
3e6e3c7
Cinidaria the Symbiote
Mystler Feb 20, 2017
fa985cc
Merge pull request #30 from Mystler/cinidaria
Fierydemise Feb 22, 2017
f051071
Add a few basic damage modifiers for Outlaw
Mystler Feb 20, 2017
848f9fc
Fix Shadow Nova APS and Anticipation is 10 CP now
Mystler Feb 22, 2017
05fad8d
Some updated values from changes since Legion release
Mystler Feb 23, 2017
d4c8715
Merge pull request #31 from Mystler/wip
Fierydemise Feb 24, 2017
a3a57b5
Modifier changes
Mystler Feb 24, 2017
4446e71
Update random prop points
Mystler Feb 24, 2017
2cb5f8a
Compile school and all damage modifiers into dict
Mystler Feb 25, 2017
2e7983e
Allow per spec proc_rates
Mystler Feb 25, 2017
413690e
Add combat rating multipliers that some trinkets scale with
Mystler Feb 25, 2017
e4d2a1c
Update proc_data for Legion trinkets
Mystler Feb 25, 2017
0622713
AoE damage trinkets
Mystler Feb 26, 2017
ca4a929
Fix Shuriken Storm builder
Mystler Feb 26, 2017
41ec4c6
No need for empty blacklists in all_damage modifiers
Mystler Feb 26, 2017
96808b3
Convergence of Fates
Mystler Feb 26, 2017
a887c22
Procs off auto attacks when autoattack_hits is not set
Mystler Feb 26, 2017
f44da39
Nightblooming Frond
Mystler Feb 26, 2017
1d80be5
Draught of Souls ability downtime
Mystler Feb 27, 2017
9ee2d53
Let's also use gear_specialization when specified
Mystler Feb 28, 2017
60feedc
Adjust proc data for Nature's Call
Mystler Feb 28, 2017
627a97e
Use uptime calculation for RPPM dot procs
Mystler Feb 28, 2017
f6b144c
Add more gear_buffs
Mystler Feb 28, 2017
297c700
Add function to get stats from the calculator
Mystler Feb 28, 2017
3353f64
Make Terrorbound Nexus not OP
Mystler Feb 28, 2017
18f573b
Nerf Tiny Oozeling
Mystler Mar 1, 2017
5eeeeca
Basic implementation for Tirathon's Betrayal and Faulty Countermeasure
Mystler Mar 1, 2017
fd2568a
Refactor code to get character stats
Mystler Mar 5, 2017
bd6b7ff
Merge pull request #32 from Mystler/procs
Fierydemise Mar 6, 2017
b21d445
Fix for Chaos Talisman and Eye of Command stacking
Mystler Mar 6, 2017
745680a
Merge pull request #33 from Mystler/procs
Fierydemise Mar 6, 2017
b4cb279
Set racial_X base stats when changing level externally
Mystler Mar 7, 2017
f235309
Use git commits for build number
Mystler Mar 8, 2017
152323a
Merge pull request #34 from Mystler/legion
Fierydemise Mar 8, 2017
baa6be3
Fix build number for Linux systems and add number check
Mystler Mar 8, 2017
53660ec
Merge pull request #35 from Mystler/legion
Fierydemise Mar 8, 2017
8b02357
Run futurize over source code
Mystler Mar 8, 2017
3060e91
Remove old_div
Mystler Mar 9, 2017
a2aa6a2
Thou shalt not tab
Mystler Mar 9, 2017
098135f
Make the tests run again
Mystler Mar 10, 2017
fa2acf2
Toss old and outdated scripts
Mystler Mar 10, 2017
5a1681b
Update README and code style guidelines
Mystler Mar 10, 2017
f972b65
Implement Old War and Prolonged Power potions
Mystler Mar 14, 2017
3edd3ed
Minor Shadow Techniques change
Mystler Mar 14, 2017
3f4a582
Merge pull request #36 from Mystler/python3-compat
Fierydemise Mar 14, 2017
0087928
Merge pull request #37 from Mystler/morestuff
Fierydemise Mar 15, 2017
668e34c
Fix Rocket Barrage for Goblins
Mystler Mar 16, 2017
05d21d3
Denial of the Half-Giants
Mystler Mar 17, 2017
5185644
Fix CPs from Shadow Blades during Dance
Mystler Mar 17, 2017
235c28d
Duskwalker's Footpads
Mystler Mar 18, 2017
d44ccc2
Mantle of the Master Assassin
Mystler Mar 19, 2017
e3cd4b6
Extended stealth mantle opener
Mystler Mar 19, 2017
81b87dc
Restore setup.py
Mar 20, 2017
33ba8c0
Setup.py readme fix
Mar 20, 2017
642f3ea
Add new trait data and implement Uncrowned damage trait
Mystler Mar 23, 2017
5af7a14
New Urge to Kill
Mystler Mar 23, 2017
a1fec63
No more subterfuge mantle uptime
Mystler Mar 23, 2017
61b3f7f
Poison Bomb is no longer RPPM
Mystler Mar 23, 2017
74ee242
Concordance of the Legionfall
Mystler Mar 23, 2017
1d1fed1
Nerf Fatebringer
Mystler Mar 24, 2017
6e3362d
Assumed probabilites for Loaded Dice rolls (NYI)
Mystler Mar 24, 2017
8987f10
Update Slice and Dice modifiers (incl. Loaded Dice)
Mystler Mar 24, 2017
ef0eaef
[Outlaw] Sabermetrics
Mystler Mar 24, 2017
4af06b7
[Outlaw] Dreadblade's Vigor
Mystler Mar 24, 2017
514db10
[Subtlety] Etched in Shadows, Shadow's Whisper and Feeding Frenzy
Mystler Mar 24, 2017
379a7fd
[Assassination] Strangler
Mystler Mar 24, 2017
bc18db4
Update test scripts
Mystler Mar 24, 2017
fc6f5c5
Update non-linear CDR for 8 possible traits
Mystler Mar 26, 2017
8d0b40d
[Assa] Sinister Circulation
Mystler Mar 26, 2017
0ce464e
[Assa] T2 Talent implementations
Mystler Mar 26, 2017
23c15c8
[Outlaw] 7.2 Spec Aura Buff
Mystler Mar 26, 2017
4f65727
Splinters of Agronax Trinket
Mystler Mar 27, 2017
71aec2e
Add everyone's favorite ring legendary
Mystler Mar 27, 2017
693f1ea
Feasts stat increase
Mystler Mar 28, 2017
0e28a18
Bump target version number
Mystler Mar 28, 2017
d981a39
[Assa] Agonizing Poison update
Mystler Apr 1, 2017
288203c
[Assa] Improved Poisons
Mystler Apr 3, 2017
be5bec4
[Assa] T19 2pc rework
Mystler Apr 3, 2017
7752a00
Update several damage formulas
Mystler Apr 3, 2017
756e074
Merge pull request #38 from Mystler/denial
Fierydemise Apr 9, 2017
cbbdfa8
Merge pull request #39 from ShadowCraft/patch-7.2
Fierydemise Apr 9, 2017
1f3f2e4
[Assa] Assassin's Resolve is hidden but active
Mystler Apr 10, 2017
b588364
Temporary changes for the new UI
Mar 20, 2017
2492d3f
Use settings_data for defaults and UI integration
Mystler Apr 13, 2017
6b74959
Merge pull request #40 from ShadowCraft/legion-newui-settings
Fierydemise Apr 17, 2017
2734f1e
[Settings] Use spec overrides instead of dicts
Mystler Apr 27, 2017
1ceb83f
Fix copy pasta
Mystler Apr 28, 2017
8cbef3a
Add Wound Poison and a settings fix
Mystler May 1, 2017
bf923a7
Jeweled Signet of Melandrus
Mystler May 2, 2017
f23d91b
Gnawed Thumb Ring
Mystler May 2, 2017
7e32a78
Fix for Nightblooming Frond
Mystler May 19, 2017
c60d031
Revert "Fix for Nightblooming Frond"
Mystler May 23, 2017
159db71
Update talent and trait data
Mystler Jun 17, 2017
a12db2a
Vendetta affects only certain abilities
Mystler Jun 17, 2017
12b542e
[Assa] Remove Agonizing Poison
Mystler Jun 17, 2017
ff21375
[Sub] Remove Etched in Shadow
Mystler Jun 17, 2017
4eaacd2
[Sub] Remove Premeditation
Mystler Jun 17, 2017
b8af54b
[Assa] Fix Wound Poison Mastery Double Dip
Mystler Jun 17, 2017
6d9c56f
[Assa] Add base functions for Toxic Blade
Mystler Jun 17, 2017
0ceec37
[Assa] Forgot DP Instant modifier
Mystler Jun 17, 2017
7bca8b8
[Assa] Add Toxic Blade
Mystler Jun 17, 2017
4c3fb4e
[Assa] Update 7.2.5 tuned numbers
Mystler Jun 17, 2017
1ca82c9
[Assa] Fix TB modifier without the talent
Mystler Jun 17, 2017
571aa18
[Sub] General 7.2.5 tuning updates
Mystler Jun 19, 2017
3805e5e
[Sub] Add Weak Point
Mystler Jun 19, 2017
e72a679
[Sub] New Symbols of Death
Mystler Jun 19, 2017
c1f0e36
[Sub] Update Subterfuge
Mystler Jun 19, 2017
52ebd39
[Sub] Relentless Strikes and Enveloping Shadows
Mystler Jun 19, 2017
5cfe704
[Sub] Nightblade modifier
Mystler Jun 19, 2017
d98f829
Slightly rework and update Marked for Death
Mystler Jun 19, 2017
ead1276
[Sub] Add missing spells to spec aura
Mystler Jun 20, 2017
a219d3b
[Sub] Shadowstrike (Rank 2)
Mystler Jun 20, 2017
97eb03d
[Sub] Dark Shadow
Mystler Jun 20, 2017
3eade96
[Sub] Shuriken Combo
Mystler Jun 20, 2017
310fce7
[Assa] T20 Bonuses
Mystler Jun 20, 2017
ff18701
[Sub] T20 Bonuses
Mystler Jun 20, 2017
c6f04a5
New legendaries
Mystler Jun 20, 2017
8796081
Add ToS trinkets
Mystler Jun 20, 2017
97ba31c
Merge pull request #42 from ShadowCraft/patch-7.2.5
Mystler Jun 20, 2017
7e2cd63
Bump versions
Mystler Jun 20, 2017
bf83601
General DfA and Sub AoE fix
Mystler Jul 8, 2017
75571f8
[Sub] DfA cooldown stacking
Mystler Jul 8, 2017
580f401
[Sub] Minicycle fixes
Mystler Jul 8, 2017
484b581
Legendary hotfix nerfs
Mystler Jul 25, 2017
3811167
Update Insignia of Ravenholdt calculation
Mystler Jul 28, 2017
d005955
Implement Cradle of Anguish
Mystler Aug 14, 2017
2d32dc8
Bump version to 7.3 and add aura hotfixes
Mystler Sep 16, 2017
d5eec71
Raise exception for Outlaw
Mystler Sep 16, 2017
0bd74de
Added traits for netherlight crucible
Sep 29, 2017
922f3ee
Implement Netherlight Crucible T2 traits
Mystler Oct 5, 2017
aa544ce
Change default potion
Mystler Oct 5, 2017
b524677
[Procs] Add Void Stalker's Contract
Mystler Oct 7, 2017
a6c4b28
[Settings] Set default EP stat to Agility
Mystler Oct 7, 2017
5ac96e3
[Subtlety] Fix for Master of Subtlety
Mystler Oct 7, 2017
91b76e9
[Subtlety] Some modifier improvements
Mystler Oct 10, 2017
c9053d7
[Talents] It's called Stratagem not Strategem
Mystler Oct 11, 2017
2b462d3
[Subtlety] Improvements for shadow dance
Mystler Oct 11, 2017
0c09451
Fix for Python 2 compat
Mystler Oct 11, 2017
e3c7041
Implement Insignia of the Grand Army legendary
Mystler Oct 14, 2017
7205235
Add EditorConfig
Mystler Oct 14, 2017
e6362d2
Add Pantheon trinkets
Mystler Nov 24, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
root = true
charset = utf-8
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,11 @@ item_db.db

/.project
/.pydevproject
*.sublime-workspace
*.sublime-project
/ShadowCraft-Engine.pyproj
/ShadowCraft-Engine.pyproj.user
/ShadowCraft-Engine.sln
/.vs/ShadowCraft-Engine/v14/.suo
/.vscode
/TestResults
2 changes: 0 additions & 2 deletions MANIFEST.in

This file was deleted.

27 changes: 0 additions & 27 deletions README

This file was deleted.

59 changes: 59 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
ShadowCraft-Engine
==================

This repository contains the calculations engine behind the ShadowCraft
theorycrafting webapp for the Rogue class in World of Warcraft. For the
web application including the UI see
[shadowcraft-ui](https://github.com/cheald/shadowcraft-ui).

ShadowCraft-Engine is written in Python and supports both Python 2 and
3. The calculation modules can be found in shadowcraft/calcs. Objects
used for those calculations are defined in shadowcraft/objects.


How To
------

In order to support both Python 2 and 3, ShadowCraft-Engine depends on
the *future* library. You can install it by running:

```
pip install future
```

To run a simple calculation for the rogue spec of your choice you can
look at the examples in the scripts folder. Feel free to play around
and edit those files as you see fit, when testing. E.g. to run a DPS
calculation for Subtlety, type:

```
python scripts/subtlety.py
```


Tests
-----

Although the tests currently do not provide good number testing for the
different specialization models, they can be used to ensure that nothing
major is broken. Run the tests using the following command:

```
python tests/runtests.py
```

Of course, we appreciate any help in extending the test coverage for the
engine.


Contributing
------------

The ShadowCraft team is always looking for help. If you would like to
contribute to the engine, you can always contact the active developers
or open a pull request on GitHub. There is also a #shadowcraft channel
on the [Ravenholdt Discord Server](https://discord.gg/DdPahJ9) that can
be used for discussion about the project.

Before writing code and submitting for review, please have a look at the
code style guidelines in style.md.
181 changes: 92 additions & 89 deletions scripts/assassination.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
from __future__ import division
from __future__ import print_function
# Simple test program to debug + play with assassination models.
from builtins import str
from os import path
import sys
from pprint import pprint
sys.path.append(path.abspath(path.join(path.dirname(__file__), '..')))

from shadowcraft.calcs.rogue.Aldriana import AldrianasRogueDamageCalculator
Expand All @@ -11,149 +15,148 @@
from shadowcraft.objects import stats
from shadowcraft.objects import procs
from shadowcraft.objects import talents
from shadowcraft.objects import glyphs
from shadowcraft.objects import artifact

from shadowcraft.core import i18n

import time

# Set up language. Use 'en_US', 'es_ES', 'fr' for specific languages.
test_language = 'local'
i18n.set_language(test_language)

start = time.time()

# Set up level/class/race
test_level = 100
test_race = race.Race('none')
test_level = 110
test_race = race.Race('blood_elf', 'rogue', 110)
test_class = 'rogue'
test_spec = 'assassination'

# Set up buffs.
test_buffs = buffs.Buffs(
#'short_term_haste_buff',
'stat_multiplier_buff',
'crit_chance_buff',
'mastery_buff',
'haste_buff',
'multistrike_buff',
'versatility_buff',
'attack_power_buff',
'physical_vulnerability_debuff',
'spell_damage_debuff',
'agi_flask_mop',
'food_mop_agi'
)
'short_term_haste_buff',
'flask_legion_agi',
'food_legion_mastery_375'
)

# Set up weapons.
test_mh = stats.Weapon(812.0, 1.8, 'dagger', 'mark_of_the_shattered_hand')
test_oh = stats.Weapon(812.0, 1.8, 'dagger', 'mark_of_the_frostwolf')
test_mh = stats.Weapon(7063.0, 1.8, 'dagger', None)
test_oh = stats.Weapon(7063.0, 1.8, 'dagger', None)

# Set up procs.
test_procs = procs.ProcsList(('scales_of_doom', 691), ('beating_heart_of_the_mountain', 701),
'draenic_agi_pot', 'draenic_agi_prepot', 'archmages_greater_incandescence')
#test_procs = procs.ProcsList(('scales_of_doom', 691), ('beating_heart_of_the_mountain', 701),
# 'draenic_agi_pot', 'draenic_agi_prepot', 'archmages_greater_incandescence')
test_procs = procs.ProcsList('old_war_pot', 'old_war_prepot',
#'convergence_of_fates',
('draught_of_souls', 910),
#('chaos_talisman', 890),
('nightblooming_frond', 910),
)

# Set up gear buffs.
test_gear_buffs = stats.GearBuffs('gear_specialization')
test_gear_buffs = stats.GearBuffs('gear_specialization',
#'the_dreadlords_deceit',
'rogue_t19_2pc',
'rogue_t19_4pc',
'zoldyck_family_training_shackles',
'mantle_of_the_master_assassin',
#'duskwalkers_footpads',
#'cinidaria_the_symbiote',
)

# Set up a calcs object..
test_stats = stats.Stats(test_mh, test_oh, test_procs, test_gear_buffs,
agi=3650,
stam=2426,
crit=1539,
haste=0,
mastery=1615,
readiness=0,
versatility=122,
multistrike=1034,)

agi=21964,
stam=32801,
crit=8749,
haste=1935,
mastery=9729,
versatility=4382,)
# Initialize talents..
test_talents = talents.Talents('3322122', test_class, test_level)

# Set up glyphs.
glyph_list = ['disappearance', 'sprint', 'vendetta'] #just to have something
test_glyphs = glyphs.Glyphs(test_class, *glyph_list)
#test_talents = talents.Talents('2110031', test_spec, test_class, level=test_level)
test_talents = talents.Talents('1230011', test_spec, test_class, level=test_level)

#initialize artifact traits..
test_traits = artifact.Artifact(test_spec, test_class, trait_dict={
'kingsbane': 1,
'assassins_blades': 1,
'toxic_blades': 3,
'poison_knives': 3,
'urge_to_kill': 1,
'balanced_blades ': 3,
'surge_of_toxins': 1,
'shadow_walker': 3,
'master_assassin': 3+2,
'shadow_swiftness': 1,
'serrated_edge': 3,
'bag_of_tricks': 1,
'master_alchemist': 3,
'gushing_wounds': 3+1,
'fade_into_shadows': 3,
'from_the_shadows': 1,
'blood_of_the_assassinated': 1,
'slayers_precision': 1,
'silence_of_the_uncrowned': 1,
'strangler': 4,
'dense_concoction': 0,
'sinister_circulation': 0,
'concordance_of_the_legionfall': 0,
})

# Set up settings.
test_cycle = settings.AssassinationCycle(min_envenom_size_non_execute=4, min_envenom_size_execute=5)
test_settings = settings.Settings(test_cycle, response_time=.5, duration=360, dmg_poison='dp', utl_poison='lp', is_pvp=False,
use_opener='always', opener_name='mutilate')
test_cycle = settings.AssassinationCycle()
test_settings = settings.Settings(test_cycle, response_time=.5, duration=300,
finisher_threshold=4)

# Build a DPS object.
calculator = AldrianasRogueDamageCalculator(test_stats, test_talents, test_glyphs, test_buffs, test_race, test_settings, test_level)
calculator = AldrianasRogueDamageCalculator(test_stats, test_talents, test_traits, test_buffs, test_race, test_spec, test_settings, test_level)

print(str(calculator.stats.get_character_stats(calculator.race, test_traits)))

# Compute DPS Breakdown.
dps_breakdown = calculator.get_dps_breakdown()
total_dps = sum(entry[1] for entry in dps_breakdown.items())
calculator.init_assassination()
non_execute_breakdown = calculator.assassination_dps_breakdown_non_execute()
non_execute_total = sum(entry[1] for entry in non_execute_breakdown.items())
calculator.init_assassination()
execute_breakdown = calculator.assassination_dps_breakdown_execute()
execute_total = sum(entry[1] for entry in execute_breakdown.items())
total_dps = sum(entry[1] for entry in list(dps_breakdown.items()))

# Compute EP values.
ep_values = calculator.get_ep(baseline_dps=total_dps)
#tier_ep_values = calculator.get_other_ep(['rogue_t14_4pc', 'rogue_t14_2pc', 'rogue_t15_4pc', 'rogue_t15_2pc', 'rogue_t16_2pc', 'rogue_t16_4pc'])
#mh_enchants_and_dps_ep_values, oh_enchants_and_dps_ep_values = calculator.get_weapon_ep(dps=True, enchants=True)

trinkets_list = [
#5.4
'assurance_of_consequence',
'haromms_talisman',
'sigil_of_rampage',
'ticking_ebon_detonator',
'thoks_tail_tip',
'discipline_of_xuen',
'fury_of_xuen',
]
# trinkets_ep_value = calculator.get_upgrades_ep_fast(trinkets_list)
tier_ep_values = calculator.get_other_ep(['rogue_t19_4pc', 'rogue_t19_2pc',
'duskwalkers_footpads', 'zoldyck_family_training_shackles', 'mantle_of_the_master_assassin'
])


#talent_ranks = calculator.get_talents_ranking()
#trait_ranks = calculator.get_trait_ranking()

def max_length(dict_list):
max_len = 0
for i in dict_list:
dict_values = i.items()
dict_values = list(i.items())
if max_len < max(len(entry[0]) for entry in dict_values):
max_len = max(len(entry[0]) for entry in dict_values)

return max_len

def pretty_print(dict_list, total_sum = 1., show_percent=False):
def pretty_print(dict_list):
max_len = max_length(dict_list)

for i in dict_list:
dict_values = i.items()
dict_values = list(i.items())
dict_values.sort(key=lambda entry: entry[1], reverse=True)
for value in dict_values:
#print value[0] + ':' + ' ' * (max_len - len(value[0])), str(value[1])
if show_percent and ("{0:.2f}".format(float(value[1])/total_sum)) != '0.00':
print value[0] + ':' + ' ' * (max_len - len(value[0])), str(value[1]) + ' ('+str( "{0:.2f}".format(100*float(value[1])/total_sum) )+'%)'
if ("{0:.2f}".format(value[1] / total_dps)) != '0.00':
print(value[0] + ':' + ' ' * (max_len - len(value[0])), str(value[1]) + ' ('+str( "{0:.2f}".format(100*float(value[1])/total_dps) )+'%)')
else:
print value[0] + ':' + ' ' * (max_len - len(value[0])), str(value[1])
print '-' * (max_len + 15)
print(value[0] + ':' + ' ' * (max_len - len(value[0])), str(value[1]))
print('-' * (max_len + 15))

dicts_for_pretty_print = [
ep_values,
#tier_ep_values,
#mh_enchants_and_dps_ep_values,
#oh_enchants_and_dps_ep_values,
#trinkets_ep_value,
#glyph_values,
tier_ep_values,
#talent_ranks,
#trinkets_ep_value,
dps_breakdown,
#trait_ranks
]
pretty_print(dicts_for_pretty_print)

pretty_print([dps_breakdown], total_sum=total_dps, show_percent=True)
print ' ' * (max_length([dps_breakdown]) + 1), total_dps, _("total damage per second.")
print ''
print "Request time: %s sec" % (time.time() - start)


print 'non-execute breakdown: '
pretty_print([non_execute_breakdown], total_sum=non_execute_total, show_percent=True)
print ' ' * (max_length([non_execute_breakdown]) + 1), non_execute_total, _("total damage per second.")
#pretty_print([dps_breakdown], total_sum=total_dps, show_percent=True)
print(' ' * (max_length([dps_breakdown]) + 1), total_dps, ("total damage per second."))

print 'execute breakdown: '
pretty_print([execute_breakdown], total_sum=execute_total, show_percent=True)
print ' ' * (max_length([execute_breakdown]) + 1), execute_total, _("total damage per second.")
#pprint(talent_ranks)
Loading