Skip to content

Commit

Permalink
fix: import latest scripts from SimulationCraft (#1038)
Browse files Browse the repository at this point in the history
* fix: add "cycle" to the script action if "cycle_targets" is present

Add `cycle` text to the script action if the SimC modifier
`cycle_targets` is specified for the action line. Also slightly
clean up the text strings for `bodyCode` to be more readable.

* fix: import scripts from SimC master from 2021-09-21

Import scripts from SimulationCraft master branch from 2021-09-21,
which was the most recent date that the T27 profiles were
regenerated.

Also sprinkle `cycle` text into existing scripts to expose SimC
`cycle_targets` logic to the player.
  • Loading branch information
johnnylam88 committed Oct 1, 2021
1 parent c21de73 commit 4df650f
Show file tree
Hide file tree
Showing 10 changed files with 319 additions and 282 deletions.
60 changes: 30 additions & 30 deletions src/scripts/ovale_druid.ts

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions src/scripts/ovale_mage.ts
Expand Up @@ -4010,9 +4010,9 @@ AddFunction frostaoemainactions
if runeforge(disciplinary_command_runeforge) and spellcooldown(disciplinary_command) <= 0 and buffexpires(disciplinary_command_fire_buff) spell(fire_blast)
#arcane_explosion,if=mana.pct>30&active_enemies>=6&!runeforge.glacial_fragments
if manapercent() > 30 and enemies() >= 6 and not runeforge(glacial_fragments_runeforge) spell(arcane_explosion)
#ice_lance,if=runeforge.glacial_fragments&talent.splitting_ice&travel_time<ground_aoe.blizzard.remains
if runeforge(glacial_fragments_runeforge) and hastalent(splitting_ice_talent) and traveltime(ice_lance) < target.debuffremaining(blizzard_debuff) spell(ice_lance)
#wait,sec=0.1,if=runeforge.glacial_fragments&talent.splitting_ice
#ice_lance,if=runeforge.glacial_fragments&(talent.splitting_ice|active_enemies>=5)&travel_time<ground_aoe.blizzard.remains
if runeforge(glacial_fragments_runeforge) and { hastalent(splitting_ice_talent) or enemies() >= 5 } and traveltime(ice_lance) < target.debuffremaining(blizzard_debuff) spell(ice_lance)
#wait,sec=0.1,if=runeforge.glacial_fragments&(talent.splitting_ice|active_enemies>=5)
#frostbolt
spell(frostbolt)
}
Expand Down Expand Up @@ -4051,7 +4051,7 @@ AddFunction frostaoeshortcdactions
AddFunction frostaoeshortcdpostconditions
{
spell(blizzard) or { target.debuffstacks(winters_chill_debuff) == 0 or target.debuffexpires(winters_chill_debuff) } and { previousgcdspell(ebonbolt) or buffpresent(brain_freeze_buff) and buffstacks(fingers_of_frost_buff) == 0 } and spell(flurry) or spell(ice_nova) or { buffpresent(fingers_of_frost_buff) or target.debuffremaining(frozen_debuff) > traveltime(ice_lance) or target.debuffstacks(winters_chill_debuff) and target.debuffremaining(winters_chill_debuff) > traveltime(ice_lance) } and spell(ice_lance) or runeforge(disciplinary_command_runeforge) and spellcooldown(disciplinary_command) <= 0 and buffexpires(disciplinary_command_fire_buff) and spell(fire_blast) or manapercent() > 30 and enemies() >= 6 and not runeforge(glacial_fragments_runeforge) and spell(arcane_explosion) or runeforge(glacial_fragments_runeforge) and hastalent(splitting_ice_talent) and traveltime(ice_lance) < target.debuffremaining(blizzard_debuff) and spell(ice_lance) or spell(frostbolt)
spell(blizzard) or { target.debuffstacks(winters_chill_debuff) == 0 or target.debuffexpires(winters_chill_debuff) } and { previousgcdspell(ebonbolt) or buffpresent(brain_freeze_buff) and buffstacks(fingers_of_frost_buff) == 0 } and spell(flurry) or spell(ice_nova) or { buffpresent(fingers_of_frost_buff) or target.debuffremaining(frozen_debuff) > traveltime(ice_lance) or target.debuffstacks(winters_chill_debuff) and target.debuffremaining(winters_chill_debuff) > traveltime(ice_lance) } and spell(ice_lance) or runeforge(disciplinary_command_runeforge) and spellcooldown(disciplinary_command) <= 0 and buffexpires(disciplinary_command_fire_buff) and spell(fire_blast) or manapercent() > 30 and enemies() >= 6 and not runeforge(glacial_fragments_runeforge) and spell(arcane_explosion) or runeforge(glacial_fragments_runeforge) and { hastalent(splitting_ice_talent) or enemies() >= 5 } and traveltime(ice_lance) < target.debuffremaining(blizzard_debuff) and spell(ice_lance) or spell(frostbolt)
}
AddFunction frostaoecdactions
Expand All @@ -4060,7 +4060,7 @@ AddFunction frostaoecdactions
AddFunction frostaoecdpostconditions
{
spell(frozen_orb) or spell(blizzard) or { target.debuffstacks(winters_chill_debuff) == 0 or target.debuffexpires(winters_chill_debuff) } and { previousgcdspell(ebonbolt) or buffpresent(brain_freeze_buff) and buffstacks(fingers_of_frost_buff) == 0 } and spell(flurry) or spell(ice_nova) or spell(comet_storm) or { buffpresent(fingers_of_frost_buff) or target.debuffremaining(frozen_debuff) > traveltime(ice_lance) or target.debuffstacks(winters_chill_debuff) and target.debuffremaining(winters_chill_debuff) > traveltime(ice_lance) } and spell(ice_lance) or soulbind(combat_meditation_soulbind) and spell(radiant_spark) or spell(mirrors_of_torment) or spell(shifting_power) or runeforge(disciplinary_command_runeforge) and spellcooldown(disciplinary_command) <= 0 and buffexpires(disciplinary_command_fire_buff) and spell(fire_blast) or manapercent() > 30 and enemies() >= 6 and not runeforge(glacial_fragments_runeforge) and spell(arcane_explosion) or spell(ebonbolt) or runeforge(glacial_fragments_runeforge) and hastalent(splitting_ice_talent) and traveltime(ice_lance) < target.debuffremaining(blizzard_debuff) and spell(ice_lance) or spell(frostbolt)
spell(frozen_orb) or spell(blizzard) or { target.debuffstacks(winters_chill_debuff) == 0 or target.debuffexpires(winters_chill_debuff) } and { previousgcdspell(ebonbolt) or buffpresent(brain_freeze_buff) and buffstacks(fingers_of_frost_buff) == 0 } and spell(flurry) or spell(ice_nova) or spell(comet_storm) or { buffpresent(fingers_of_frost_buff) or target.debuffremaining(frozen_debuff) > traveltime(ice_lance) or target.debuffstacks(winters_chill_debuff) and target.debuffremaining(winters_chill_debuff) > traveltime(ice_lance) } and spell(ice_lance) or soulbind(combat_meditation_soulbind) and spell(radiant_spark) or spell(mirrors_of_torment) or spell(shifting_power) or runeforge(disciplinary_command_runeforge) and spellcooldown(disciplinary_command) <= 0 and buffexpires(disciplinary_command_fire_buff) and spell(fire_blast) or manapercent() > 30 and enemies() >= 6 and not runeforge(glacial_fragments_runeforge) and spell(arcane_explosion) or spell(ebonbolt) or runeforge(glacial_fragments_runeforge) and { hastalent(splitting_ice_talent) or enemies() >= 5 } and traveltime(ice_lance) < target.debuffremaining(blizzard_debuff) and spell(ice_lance) or spell(frostbolt)
}
### actions.default
Expand Down
54 changes: 39 additions & 15 deletions src/scripts/ovale_paladin.ts
Expand Up @@ -34,24 +34,40 @@ AddFunction holygetinmeleerange
AddFunction holyprioritymainactions
{
#shield_of_the_righteous
spell(shield_of_the_righteous)
#shield_of_the_righteous,if=buff.avenging_wrath.up|buff.holy_avenger.up|!talent.awakening.enabled
if buffpresent(avenging_wrath) or buffpresent(holy_avenger) or not hastalent(awakening_talent) spell(shield_of_the_righteous)
#hammer_of_wrath,if=holy_power<5&spell_targets.consecration=2
if holypower() < 5 and enemies(tagged=1) == 2 spell(hammer_of_wrath)
#lights_hammer,if=spell_targets.lights_hammer>=2
if enemies(tagged=1) >= 2 spell(lights_hammer)
#consecration,if=spell_targets.consecration>=2&!consecration.up
if enemies(tagged=1) >= 2 and not buffpresent(consecration) spell(consecration)
#light_of_dawn,if=talent.awakening.enabled&spell_targets.consecration<=5&(holy_power>=5|(buff.holy_avenger.up&holy_power>=3))
if hastalent(awakening_talent) and enemies(tagged=1) <= 5 and { holypower() >= 5 or buffpresent(holy_avenger) and holypower() >= 3 } spell(light_of_dawn)
#shield_of_the_righteous,if=spell_targets.consecration>5
if enemies(tagged=1) > 5 spell(shield_of_the_righteous)
#hammer_of_wrath
spell(hammer_of_wrath)
#holy_shock,damage=1
spell(holy_shock)
#judgment
spell(judgment_holy)
#crusader_strike
spell(crusader_strike)
#lights_hammer
spell(lights_hammer)
#consecration,if=!consecration.up
if not buffpresent(consecration) spell(consecration)
#holy_shock,damage=1
spell(holy_shock)
#crusader_strike,if=cooldown.crusader_strike.charges=2
if spellcharges(crusader_strike) == 2 spell(crusader_strike)
#holy_prism,target=self,if=active_enemies>=2
if enemies() >= 2 spell(holy_prism text=self)
#holy_prism
spell(holy_prism)
#light_of_dawn,if=talent.awakening.enabled&spell_targets.consecration<=5
if hastalent(awakening_talent) and enemies(tagged=1) <= 5 spell(light_of_dawn)
#crusader_strike
spell(crusader_strike)
#consecration
spell(consecration)
#light_of_dawn
spell(light_of_dawn)
}
AddFunction holyprioritymainpostconditions
Expand All @@ -64,16 +80,21 @@ AddFunction holypriorityshortcdactions
AddFunction holypriorityshortcdpostconditions
{
spell(shield_of_the_righteous) or spell(hammer_of_wrath) or spell(holy_shock) or spell(judgment_holy) or spell(crusader_strike) or enemies() >= 2 and spell(holy_prism text=self) or spell(holy_prism) or spell(consecration) or spell(light_of_dawn)
{ buffpresent(avenging_wrath) or buffpresent(holy_avenger) or not hastalent(awakening_talent) } and spell(shield_of_the_righteous) or holypower() < 5 and enemies(tagged=1) == 2 and spell(hammer_of_wrath) or enemies(tagged=1) >= 2 and spell(lights_hammer) or enemies(tagged=1) >= 2 and not buffpresent(consecration) and spell(consecration) or hastalent(awakening_talent) and enemies(tagged=1) <= 5 and { holypower() >= 5 or buffpresent(holy_avenger) and holypower() >= 3 } and spell(light_of_dawn) or enemies(tagged=1) > 5 and spell(shield_of_the_righteous) or spell(hammer_of_wrath) or spell(judgment_holy) or spell(lights_hammer) or not buffpresent(consecration) and spell(consecration) or spell(holy_shock) or spellcharges(crusader_strike) == 2 and spell(crusader_strike) or enemies() >= 2 and spell(holy_prism text=self) or spell(holy_prism) or hastalent(awakening_talent) and enemies(tagged=1) <= 5 and spell(light_of_dawn) or spell(crusader_strike) or spell(consecration)
}
AddFunction holyprioritycdactions
{
unless { buffpresent(avenging_wrath) or buffpresent(holy_avenger) or not hastalent(awakening_talent) } and spell(shield_of_the_righteous) or holypower() < 5 and enemies(tagged=1) == 2 and spell(hammer_of_wrath) or enemies(tagged=1) >= 2 and spell(lights_hammer) or enemies(tagged=1) >= 2 and not buffpresent(consecration) and spell(consecration) or hastalent(awakening_talent) and enemies(tagged=1) <= 5 and { holypower() >= 5 or buffpresent(holy_avenger) and holypower() >= 3 } and spell(light_of_dawn) or enemies(tagged=1) > 5 and spell(shield_of_the_righteous) or spell(hammer_of_wrath) or spell(judgment_holy) or spell(lights_hammer) or not buffpresent(consecration) and spell(consecration) or spell(holy_shock) or spellcharges(crusader_strike) == 2 and spell(crusader_strike) or enemies() >= 2 and spell(holy_prism text=self) or spell(holy_prism)
{
#arcane_torrent
spell(arcane_torrent)
}
}
AddFunction holyprioritycdpostconditions
{
spell(shield_of_the_righteous) or spell(hammer_of_wrath) or spell(holy_shock) or spell(judgment_holy) or spell(crusader_strike) or enemies() >= 2 and spell(holy_prism text=self) or spell(holy_prism) or spell(consecration) or spell(light_of_dawn)
{ buffpresent(avenging_wrath) or buffpresent(holy_avenger) or not hastalent(awakening_talent) } and spell(shield_of_the_righteous) or holypower() < 5 and enemies(tagged=1) == 2 and spell(hammer_of_wrath) or enemies(tagged=1) >= 2 and spell(lights_hammer) or enemies(tagged=1) >= 2 and not buffpresent(consecration) and spell(consecration) or hastalent(awakening_talent) and enemies(tagged=1) <= 5 and { holypower() >= 5 or buffpresent(holy_avenger) and holypower() >= 3 } and spell(light_of_dawn) or enemies(tagged=1) > 5 and spell(shield_of_the_righteous) or spell(hammer_of_wrath) or spell(judgment_holy) or spell(lights_hammer) or not buffpresent(consecration) and spell(consecration) or spell(holy_shock) or spellcharges(crusader_strike) == 2 and spell(crusader_strike) or enemies() >= 2 and spell(holy_prism text=self) or spell(holy_prism) or hastalent(awakening_talent) and enemies(tagged=1) <= 5 and spell(light_of_dawn) or spell(crusader_strike) or spell(consecration)
}
### actions.precombat
Expand Down Expand Up @@ -101,7 +122,7 @@ AddFunction holyprecombatcdactions
#augmentation
#snapshot_stats
#potion
if checkboxon(opt_use_consumables) and target.classification(worldboss) item(potion_of_phantom_fire_item usable=1)
if checkboxon(opt_use_consumables) and target.classification(worldboss) item(potion_of_spectral_intellect_item usable=1)
}
AddFunction holyprecombatcdpostconditions
Expand Down Expand Up @@ -140,15 +161,15 @@ AddFunction holycooldownsshortcdpostconditions
AddFunction holycooldownscdactions
{
#avenging_wrath
spell(avenging_wrath)
#ashen_hallow
spell(ashen_hallow)
#avenging_wrath
spell(avenging_wrath)
unless spell(blessing_of_the_seasons) or spell(vanquishers_hammer) or spell(divine_toll)
{
#potion,if=(buff.avenging_wrath.up)
if buffpresent(avenging_wrath) and { checkboxon(opt_use_consumables) and target.classification(worldboss) } item(potion_of_phantom_fire_item usable=1)
if buffpresent(avenging_wrath) and { checkboxon(opt_use_consumables) and target.classification(worldboss) } item(potion_of_spectral_intellect_item usable=1)
#blood_fury,if=(buff.avenging_wrath.up)
if buffpresent(avenging_wrath) spell(blood_fury_ap_int)
#berserking,if=(buff.avenging_wrath.up)
Expand Down Expand Up @@ -261,8 +282,10 @@ AddIcon enabled=(checkboxon(opt_paladin_holy_aoe) and specialization(holy)) help
}
### Required symbols
# arcane_torrent
# ashen_hallow
# avenging_wrath
# awakening_talent
# berserking
# blessing_of_the_seasons
# blood_fury_ap_int
Expand All @@ -275,7 +298,8 @@ AddIcon enabled=(checkboxon(opt_paladin_holy_aoe) and specialization(holy)) help
# holy_shock
# judgment_holy
# light_of_dawn
# potion_of_phantom_fire_item
# lights_hammer
# potion_of_spectral_intellect_item
# rebuke
# seraphim
# shield_of_the_righteous
Expand Down
10 changes: 10 additions & 0 deletions src/scripts/ovale_paladin_spells.ts
Expand Up @@ -169,6 +169,10 @@ Define(judgment_protection 275779)
Define(light_of_dawn 85222)
# Unleashes a wave of holy energy, healing up to s1 injured allies within a ?a337812[a3][a1] yd frontal cone for (105 of Spell Power).
SpellInfo(light_of_dawn holypower=3)
Define(lights_hammer 114158)
# Hurls a Light-infused hammer to the ground, dealing (20.5 of Spell Power) Holy damage to nearby enemies and healing up to 6 nearby allies for (25 of Spell Power), every 114918t1 sec for 15.5 seconds-1.5 sec.
SpellInfo(lights_hammer cd=60)
SpellRequire(lights_hammer unusable set=1 enabled=(not hastalent(lights_hammer_talent)))
Define(lights_judgment 255647)
# Call down a strike of Holy energy, dealing <damage> Holy damage to enemies within A1 yards after 3 sec.
SpellInfo(lights_judgment cd=150)
Expand Down Expand Up @@ -224,6 +228,8 @@ Define(word_of_glory 85673)
SpellList(blessing_of_the_seasons blessing_of_spring blessing_of_summer blessing_of_autumn blessing_of_winter)
Define(avenging_crusader_talent 22190)
# You become the ultimate crusader of light, increasing your Crusader Strike, Judgment, and auto-attack damage by s1.rnrnCrusader Strike and Judgment cool down s2 faster and heal up to s6 injured allies for s5 of the damage they deal. Lasts 20 seconds.
Define(awakening_talent 22484)
# Word of Glory and Light of Dawn have a s1 chance to grant you Avenging Wrath for s2 sec.
Define(blade_of_wrath_talent 22592)
# Art of War resets the cooldown of Blade of Justice s1 more often and increases its damage by 281178s1.
Define(blessed_hammer_talent 23469)
Expand All @@ -242,6 +248,8 @@ Define(holy_avenger_talent 17599)
# Your Holy Power generation is tripled for 20 seconds.
Define(holy_prism_talent 17577)
# Fires a beam of light that scatters to strike a clump of targets. rnrnIf the beam is aimed at an enemy target, it deals (75 of Spell Power) Holy damage and radiates (70 of Spell Power) healing to 5 allies within 114852A2 yards.rnrnIf the beam is aimed at a friendly target, it heals for (140 of Spell Power) and radiates (45 of Spell Power) Holy damage to 5 enemies within 114871A2 yards.
Define(lights_hammer_talent 17569)
# Hurls a Light-infused hammer to the ground, dealing (20.5 of Spell Power) Holy damage to nearby enemies and healing up to 6 nearby allies for (25 of Spell Power), every 114918t1 sec for 15.5 seconds-1.5 sec.
Define(moment_of_glory_talent 23468)
# Reset the cooldown of Avenger's Shield. Your next n Avenger's Shields have no cooldown and deal s2 additional damage.
Define(righteous_verdict_talent 22557)
Expand All @@ -252,6 +260,8 @@ Define(sanctified_wrath_talent_protection 23457)
# Avenging Wrath lasts s1 longer and causes Judgment to generate s2 additional Holy Power.
Define(seraphim_talent 17601)
# The Light magnifies your power for 15 seconds, granting s1 Haste, Critical Strike, and Versatility, and ?c1[s4*183997bc1]?c2[s4*76671bc1][s4*267316bc1] Mastery.
Define(potion_of_spectral_intellect_item 171273)
ItemInfo(potion_of_spectral_intellect_item cd=1 shared_cd="item_cd_4" proc=307162)
Define(potion_of_phantom_fire_item 171349)
ItemInfo(potion_of_phantom_fire_item cd=300 shared_cd="item_cd_4" rppm=12 proc=307495)
Define(darkmoon_deck_voracity_item 173087)
Expand Down

0 comments on commit 4df650f

Please sign in to comment.