Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fixes to import harness and import latest scripts (#994)
* fix: generate 9.1 scripts from Tier27 SimulationCraft profiles * fix: adjust names of spell scripts for Shadowlands 9.1 * fix: use correct SpellId names instead of hardcoding constants * fix: ensure that 'this' is valid within parseGroup * fix: update conduit data * fix: update usage of method in OvaleScripts class to correct name The name of the script registration method was changed to `registerScript` in commit af6216a. * fix: remove identifier fixes that were not necessary * style: sort fixIdentifier() section * fix: support heroic_charge action (Heroic Leap, then Charge) * fix: workaround name=name= syntax error in SimC profiles The offending line is in T27_Warlock_Affliction.simc: /use_item,name=name=shadowed_orb_of_torment,... where the `name=name=` looks like a copy-and-paste error. * fix: workaround name=BT&Foo syntax error in SimC profiles The SimulationCraft parser accepts `&` as a valid character in name strings, which is surprising since it's a keyword token. The offending lines are in T27_Warrior_Fury.simc: /sequence,...,name=BT&Charge:bloodthirst:heroic_charge /sequence,...,name=BT&Reck:bloodthirst:recklessness and we simply replace the `&` with `_` to harmlessly fix the error. * fix: add Merciless Bonegrinder soulbind and buff for warriors * fix: decorate warlock pet interrupt and CC spells * fix: support warlock interrupts SimulationCraft profiles use an warlock-specific action `interrupt` as a catch-all action to trigger pet interrupt abilities. Convert that action to a warlock-specific `InterruptActions` function in the Ovale script. * fix: from_the_shadows is a target debuff, not a player buff Fix a bug in the SimC usage of `from_the_shadows` as it's implemented as a target debuff, but the profile is using it as a player buff. * fix: add flagellation_buff granted by spending CPs during Flagellation * fix: disambiguate blood_fury for paladins Orcs can't (currently) be paladins, but the `T27_Paladin_Holy.simc` profile tries suggesting `blood_fury`, so make it work. * fix: change bonedust_brew_debuff to just bonedust_brew Bonedust Brew coats friendlies and enemies alike with the same aura, but it is a buff or debuff depending on the target. * fix: add spell definition for ravenous_frenzy_sinful_hysteria_buff This is the buff that's triggered by the Sinful Hysteria legendary when the druid casts the Venthyr covenant ability Ravenous Frenzy. * fix: add partial support for "newfound_resolve" action Ignore all modifiers for the `newfound_resolve` action and just replace it with a check for whether the Trial of Doubt debuff exists and whether it's time to face the manifestation. * fix: support cp_gain modifier in SimC profile `cp_gain` is the actual number of combo points that would be gained by using an ability, taking into account the combo point cap. * fix: update Serrated Bone Spike to 9.1 behavior Serrated Bone Spikes grants one combo point on use plus an additional combo point for each Serrated Bone Spike that is active. * fix: ignore "retarget_auto_attack" action For now, ignore `retarget_auto_attack`. It's an indication to target other enemies for attack and used by havoc demon hunter profiles to suggest spreading Burning Wound, but the SimC implementation is clunky and not worth directly translating. * fix: correctly translate cooldowns for items that proc buffs SimulationCraft added a way to get the cooldown of an item by checking the cooldown of the procced buff. Translate the buff name back into the item name and directly check the item cooldown. * fix: support {duration,remains}_expected as cooldown properties For Ovale, `duration_expected` and `remains_expected` are essentially the same as `duration` and `remains` since we are constantly updating state from the game client. * fix: support {regen,time_to_max}_combined as energy properties The implementation of these two properties should factor in energy regenerated from active buffs, but for now, treating them the same as `regen` and `time_to_max` is sufficient. * fix: add missing HasWeapon script condition used for main_hand.2h * fix: parse 'sequence' actions correctly Correctly handle the `:` token that separates the different sub-actions within each sequence. Each sub-action can have modifiers as well, which are separated by `,` tokens. * fix: include item identifiers in the common script Add `Define(identifier nnn)` lines to `ovale_common` for better readability. * fix: support more SimC "trinket" properties Emit code for more `trinket` conditions: - `trinket.cooldown.ready` - `trinket.has_buff.<stat>` - `trinket.has_proc.<stat>.duration` - `trinket.has_use_buff` * fix: support "death_and_decay.active_remains" in SimC profiles * fix: use correct trinket name for Tormented Insight buff Add a special adjustment for `tormented_insight_355321` so that the correct trinket name is inferred by renaming the buff in the profile to `shadowed_orb_of_torment_355321`. * refactor: extract function to walk a spell "replaced_by" chain Extract a function from `best-action` to walk the `replaced_by` chain in `SpellInfo` declarations and add it to the `data` module as `resolveSpell()`. * fix: resolve spells in SpellCooldown() condition before checking `SpellCooldown()` can take a list of spell IDs and returns the earliest time that one is available. Resolve the spell IDs to their final replacement spells if they were replaced because the WoW API function `GetSpellCooldown()` returns 0 if used with original spell ID, even though it's been replaced in the spell book. * fix: disambiguate "bs_inc" into "berserk_{bear,cat}" Disambiguate `bs_inc` into `berserk_bear` or `berserk_cat` based on druid specialization so that we can correctly check the cooldown of the spell. * fix: disambiguate "berserk" into "berserk_{bear,cat}" Disambiguate `berserk` into `berserk_bear` or `berserk_cat` based on the druid specialization so we refer to the corect action. * fix: disambiguate "incarnation" action for each druid specialization * fix: remove unneeded "berserk" spell list * fix: support "ca_inc" in balance druid SimC profiles `buff.ca_inc.up` should check for either Celestial Alignment or Incarnation: Chosen of Elune, so create a `ca_inc_buff` spell list for those two buffs. * fix: eclipse module correctly handles Incarnation: Chosen of Elune * fix: remaining_winters_chill tracks a target, not player, debuff * style: minor whitespace changes to ovale_mage_spells * fix: decorate winters_chill_debuff for frost mages Note which spells add and remove Winter's Chill debuff from the target. * fix: support raid_event.vulnerable.{exists,in,up} in SimC profiles Support `raid_event.vulnerable.*` events by assuming the target is always vulnerable. * fix: support "searing_touch.active" for fire mage SimC profiles * fix: support "precast_etf_equip" for MM hunter SimC profiles The MM hunter profile uses `precast_etf_equip=1` to test if the Eagletalon's True Focus legendary is equipped. * fix: support "bloodseeker.remains" in survival hunter SimC profiles * fix: allow "code" without "symbolsInCode" in emitMiscOperand * fix: support "expected_kindling_reduction" in fire mage SimC profiles * fix: support "target.cooldown.pause_action.*" in SimC profiles `pause_action` is a dummy action that indicates that the enemy is not attacking the player. Model this dummy action as never happening. * fix: support "buff.recent_purifies.value" in SimC profiles `buff.recent_purifies.value` is how SimC exports the amount of Stagger that was removed by the most recent Purifying Brew. Model this as simply always being the value `MaxHealth() * 0.05` for now. * fix: support "execute_time" operand for "use_item" actions Assume that on-use items have an execute time of zero seconds. * fix: aura IDs are not always in the spellbook Don't set `isSpell` when describing the first positional parameter to `BuffPresent` and its aliases. Otherwise, the compiler will complain if `BuffPresent` is called with an ID not in the spellbook, which can often happen with buffs. * fix: use the exact item if the name is provided Many SimC profiles are now very sophisticated in using specific trinkets under specific conditions. Use the exact trinket if the name is provided in `use_item` actions. * fix: correctly tag items identified by slot name for splitting * fix: import scripts from simc shadowlands branch from 2021-09-03 * fix: use T27 script names in the integration tests * fix: fixes for integration test There is probably a better way to do this by telling the compiler that item cannot be undefined, but I'm not sure how to do that yet. * fix: set the T27 scripts as the default for all specializations Co-authored-by: Sidoine De Wispelaere <sidoine@sidoine.net>
- Loading branch information