Skip to content

Commit

Permalink
Merge pull request #48 from wowsims/cleanup
Browse files Browse the repository at this point in the history
SoD cleanup
  • Loading branch information
kayla-glick authored Dec 23, 2024
2 parents 1e13f95 + b228275 commit c2806f8
Show file tree
Hide file tree
Showing 129 changed files with 580 additions and 7,859 deletions.
Binary file removed assets/img/blood_rune.png
Binary file not shown.
Binary file removed assets/img/death_rune.png
Binary file not shown.
Binary file removed assets/img/frost_rune.png
Binary file not shown.
Binary file removed assets/img/unholy_rune.png
Binary file not shown.
3 changes: 0 additions & 3 deletions proto/apl.proto
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ message APLValue {
APLValueTotemRemainingTime totem_remaining_time = 49;
// Druid
APLValueCatExcessEnergy cat_excess_energy = 52;
APLValueCatNewSavageRoarDuration cat_new_savage_roar_duration = 61;
// Warlock
APLValueWarlockShouldRecastDrainSoul warlock_should_recast_drain_soul = 59;
APLValueWarlockShouldRefreshCorruption warlock_should_refresh_corruption = 60;
Expand Down Expand Up @@ -518,8 +517,6 @@ message APLValueTotemRemainingTime {
}
message APLValueCatExcessEnergy {
}
message APLValueCatNewSavageRoarDuration {
}
message APLValueWarlockShouldRecastDrainSoul {
}
message APLValueWarlockShouldRefreshCorruption {
Expand Down
39 changes: 0 additions & 39 deletions proto/druid.proto
Original file line number Diff line number Diff line change
Expand Up @@ -60,45 +60,6 @@ message DruidTalents {
bool swiftmend = 47;
}

enum DruidRune {
DruidRuneNone = 0;

RuneHelmGaleWinds = 417135;
RuneHelmGore = 417145;
RuneHelmImprovedBarkskin = 431388;

RuneCloakImprovedSwipe = 439510;
RuneCloakTreeofLife = 439733;
RuneCloakStarfall = 439748;

RuneChestFuryOfStormrage = 414799;
RuneChestLivingSeed = 414677;
RuneChestSurvivalOfTheFittest = 411115;
RuneChestWildStrikes = 407977;

RuneBracersEfflorescence = 417149;
RuneBracersElunesFires = 414719;
RuneBracersImpFrenziedRegen = 431389;

RuneHandsMangle = 407995;
RuneHandsSunfire = 414684;
RuneHandsWildGrowth = 408120;
RuneHandsSkullBash = 410176;

RuneBeltBerserk = 417141;
RuneBeltEclipse = 408248;
RuneBeltNourish = 408247;

RuneLegsStarsurge = 417157;
RuneLegsSavageRoar = 407988;
RuneLegsLifebloom = 409824;
RuneLegsLacerate = 414644;

RuneFeetDreamstate = 408258;
RuneFeetKingOfTheJungle = 417046;
RuneFeetSurvivalInstincts = 408024;
}

message BalanceDruid {
message Rotation {
}
Expand Down
41 changes: 0 additions & 41 deletions proto/hunter.proto
Original file line number Diff line number Diff line change
Expand Up @@ -102,47 +102,6 @@ message HunterPetTalents {
int32 silverback = 37;
}

enum HunterRune {
HunterRuneNone = 0;

RuneHelmRapidKilling = 415405;
RuneHelmLockAndLoad = 415413;
RuneHelmCatlikeReflexes = 415428;

RuneCloakImprovedVolley = 440520;
RuneCloakResourcefulness = 440529;
RuneCloakHitAndRun = 440533;

RuneChestBeastmastery = 409368;
RuneChestMasterMarksman = 409428;
RuneChestLoneWolf = 415370;
RuneChestCobraStrikes = 425713;

RuneBracersRaptorFury = 415358;
RuneBracersFocusFire = 428726;
RuneBracersTNT = 428717;

RuneHandsCobraSlayer = 458393;
RuneHandsChimeraShot = 409433;
RuneHandsExplosiveShot = 409552;
RuneHandsCarve = 425711;

RuneBeltExposeWeakness = 409504;
RuneBeltMeleeSpecialist = 415352;
RuneBeltSteadyShot = 437123;

RuneLegsKillShot = 409593;
RuneLegsFlankingStrike = 415320;
RuneLegsSniperTraining = 415399;
RuneLegsSerpentSpread = 425738;

RuneBootsTrapLauncher = 409541;
RuneBootsDualWieldSpecialization = 409687;
RuneBootsWyvernStrike = 458479;

RuneUtilityHeartOfTheLion = 409580;
}

message Hunter {
message Rotation {
enum RotationType {
Expand Down
40 changes: 0 additions & 40 deletions proto/mage.proto
Original file line number Diff line number Diff line change
Expand Up @@ -60,46 +60,6 @@ message MageTalents {
bool ice_barrier = 49;
}

enum MageRune {
MageRuneNone = 0;

RuneHelmAdvancedWarding = 428738;
RuneHelmDeepFreeze = 428739;
RuneHelmHotStreak = 400624;
RuneHelmTemporalAnomaly = 429305;

RuneCloakArcaneBarrage = 400610;
RuneCloakOverheat = 400615;
RuneCloakFrozenOrb = 440802;

RuneChestBurnout = 412286;
RuneChestEnlightenment = 412324;
RuneChestFingersOfFrost = 400647;
RuneChestRegeneration = 401417;

RuneBracersMoltenArmor = 428741;
RuneBracersDisplacement = 428863;
RuneBracersBalefireBolt = 428878;
RuneBracersRewindTime = 401462;

RuneHandsArcaneBlast = 400574;
RuneHandsIceLance = 400640;
RuneHandsLivingBomb = 400613;

RuneBeltFrostfireBolt = 401502;
RuneBeltMissileBarrage = 400588;
RuneBeltSpellfrostBolt = 412532;

RuneLegsArcaneSurge = 425124;
RuneLegsIceVeins = 425121;
RuneLegsLivingFlame = 401556;
RuneLegsMassRegeneration = 412510;

RuneFeetBrainFreeze = 400731;
RuneFeetChronoPreservation = 436516;
RuneFeetSpellPower = 412322;
}

message Mage {
message Rotation {
}
Expand Down
45 changes: 0 additions & 45 deletions proto/paladin.proto
Original file line number Diff line number Diff line change
Expand Up @@ -55,51 +55,6 @@ message PaladinTalents {
bool repentance = 44;
}

enum PaladinRune {
PaladinRuneNone = 0;

RuneHeadFanaticism = 429142;
RuneHeadImprovedSanctuary = 429133;
RuneHeadWrath = 429139;

RuneCloakShieldOfRighteousness = 440658;
RuneCloakVindicator = 440666;
RuneCloakShockAndAwe = 462834;
RuneCloakRighteousVengeance = 440672;

RuneChestDivineStorm = 407778;
RuneChestAegis = 425589;
RuneChestHallowedGround = 458287;
RuneChestDivineLight = 458856;

RuneWristHammerOfTheRighteous = 407632;
RuneWristLightsGrace = 428909;
RuneWristPurifyingPower = 429144;
RuneWristImprovedHammerOfWrath = 429152;

RuneHandsBeaconOfLight = 407613;
RuneHandsHandOfReckoning = 407631;
RuneHandsCrusaderStrike = 407676;

RuneWaistInfusionOfLight = 426065;
RuneWaistSheathOfLight = 426158;
RuneWaistMalleableProtection = 458318;

RuneLegsAuraMastery = 407624;
RuneLegsAvengersShield = 407669;
RuneLegsDivineSacrifice = 407804;
RuneLegsInspirationExemplar = 407880;
RuneLegsRebuke = 425609;

RuneFeetSacredShield = 412019;
RuneFeetGuardedByTheLight = 415059;
RuneFeetTheArtOfWar = 426157;

RuneUtilitySealOfMartyrdom = 407798;
RuneUtilityExorcist = 415076;
RuneUtilityAvengingWrath = 407788;
}

enum Blessings {
BlessingUnknown = 0;
BlessingOfKings = 1;
Expand Down
41 changes: 0 additions & 41 deletions proto/shaman.proto
Original file line number Diff line number Diff line change
Expand Up @@ -57,47 +57,6 @@ message ShamanTalents {
bool mana_tide_totem = 46;
}

enum ShamanRune {
RuneNone = 0;

RuneHelmBurn = 415231;
RuneHelmMentalDexterity = 415140;
RuneHelmTidalWaves = 432042;

RuneCloakCoherence = 415096;
RuneCloakStormEarthAndFire = 440569;
RuneCloakFeralSpirit = 440580;

RuneChestDualWieldSpec = 408496;
RuneChestHealingRain = 415236;
RuneChestOverload = 408438;
RuneChestShieldMastery = 408524;
RuneChestTwoHandedMastery = 436364;

RuneBracersOvercharged = 432140;
RuneBracersRiptide = 408521;
RuneBracersRollingThunder = 432056;
RuneBracersStaticShock = 432134;

RuneHandsLavaBurst = 408490;
RuneHandsLavaLash = 408507;
RuneHandsMoltenBlast = 425339;
RuneHandsWaterShield = 408510;

RuneWaistFireNova = 408339;
RuneWaistMaelstromWeapon = 408498;
RuneWaistPowerSurge = 415100;

RuneLegsAncestralGuidance = 409324;
RuneLegsEarthShield = 408514;
RuneLegsWayOfEarth = 408531;
RuneLegsGreaterGhostWolf = 415813;

RuneFeetAncestralAwakening = 425858;
RuneFeetDecoyTotem = 425874;
RuneFeetSpiritOfTheAlpha = 408696;
}

enum EarthTotem {
NoEarthTotem = 0;
StrengthOfEarthTotem = 1;
Expand Down
52 changes: 0 additions & 52 deletions proto/warrior.proto
Original file line number Diff line number Diff line change
Expand Up @@ -63,58 +63,6 @@ message WarriorTalents {
bool shield_slam = 52;
}

enum WarriorRune {
WarriorRuneNone = 0;

// Helm
RuneEndlessRage = 403218;
RuneTasteForBlood = 426953;
RuneVigilance = 426972;
RuneShieldMastery = 426980;

// Cloak
RuneSuddenDeath = 440113;
RuneFreshMeat = 440484;
RuneShockwave = 440488;

// Chest
RuneFlagellation = 402877;
RuneRagingBlow = 402911;
RuneBloodFrenzy = 412507;
RuneWarbringer = 425421;

// Bracers
RuneRampage = 426940;
RuneSwordAndBoard = 426978;
RuneWreckingCrew = 427065;

// Hands
RuneVictoryRush = 402927;
RuneDevastate = 403195;

RuneSingleMindedFury = 413404;
RuneQuickStrike = 429765;

// Waist
RuneFocusedRage = 29787;
RunePreciseTiming = 402922;
RuneBloodSurge = 413380;

// Legs
RuneFuriousThunder = 403219;
RuneFrenziedAssault = 425412;
RuneConsumedByRage = 425418;

// Feet
RuneEnragedRegeneration = 403467;
RuneIntervene = 403472;
RuneRallyingCry = 426491;
RuneGladiatorStance = 412513;

// Utility
RuneCommandingShout = 403446;
}

enum WarriorShout {
WarriorShoutNone = 0;
WarriorShoutBattle = 1;
Expand Down
4 changes: 0 additions & 4 deletions sim/core/apl.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package core

import (
"fmt"
"slices"
"time"

"github.com/wowsims/classic/sim/core/proto"
Expand Down Expand Up @@ -170,9 +169,6 @@ func (rot *APLRotation) reset(sim *Simulation) {
rot.inLoop = false
rot.interruptChannelIf = nil
rot.allowChannelRecastOnInterrupt = false
rot.allowCastWhileChanneling = slices.ContainsFunc(rot.unit.Spellbook, func(spell *Spell) bool {
return spell.Flags.Matches(SpellFlagCastWhileChanneling)
})
for _, action := range rot.allAPLActions() {
action.impl.Reset(sim)
}
Expand Down
42 changes: 1 addition & 41 deletions sim/core/cast.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,20 +194,10 @@ func (spell *Spell) makeCastFunc(config CastConfig) CastSuccessFunc {
}

if hc := spell.Unit.Hardcast; spell.Unit.IsCasting(sim) {
// Attempt to use a queued cast-while-casting spell mid-hard cast
if cwc := spell.Unit.castWhileCastingAction; cwc != nil {
cwc.OnAction(sim)
}

return spell.castFailureHelper(sim, "casting/channeling %v for %s, curTime = %s", hc.ActionID, hc.Expires-sim.CurrentTime, sim.CurrentTime)
}

if dot := spell.Unit.ChanneledDot; spell.Unit.IsChanneling(sim) && !spell.Flags.Matches(SpellFlagCastWhileChanneling) {
// Attempt to use a queued cast-while-casting spell mid-hard cast
if cwc := spell.Unit.castWhileCastingAction; cwc != nil {
cwc.OnAction(sim)
}

if dot := spell.Unit.ChanneledDot; spell.Unit.IsChanneling(sim) {
return spell.castFailureHelper(sim, "channeling %v for %s, curTime = %s", dot.ActionID, dot.expires-sim.CurrentTime, sim.CurrentTime)
}

Expand All @@ -233,36 +223,6 @@ func (spell *Spell) makeCastFunc(config CastConfig) CastSuccessFunc {
spell.Unit.AutoAttacks.StopMeleeUntil(sim, restartMeleeAt, false)
}

// Castable-while-casting spells
if spell.Flags.Matches(SpellFlagCastWhileCasting) {
// Queue cast-while-casting spells to cast 750 ms into the next hard-cast
pa := &PendingAction{
NextActionAt: sim.CurrentTime + GCDDefault/2,
OnAction: func(sim *Simulation) {
spell.LastCastAt = sim.CurrentTime

if sim.Log != nil && !spell.Flags.Matches(SpellFlagNoLogs) {
spell.Unit.Log(sim, "Casting %s (Cost = %0.03f, Cast Time = %s, Effective Time = %s)",
spell.ActionID, max(0, spell.CurCast.Cost), spell.CurCast.CastTime, spell.CurCast.EffectiveTime())
spell.Unit.Log(sim, "Completed cast %s", spell.ActionID)
}

if spell.Cost != nil {
spell.Cost.SpendCost(sim, spell)
}

spell.applyEffects(sim, target)

if !spell.Flags.Matches(SpellFlagNoOnCastComplete) {
spell.Unit.OnCastComplete(sim, spell)
}
},
}
spell.Unit.castWhileCastingAction = pa
sim.AddPendingAction(pa)
return true
}

// Hardcasts
if spell.CurCast.CastTime > 0 {
if sim.Log != nil && !spell.Flags.Matches(SpellFlagNoLogs) {
Expand Down
Loading

0 comments on commit c2806f8

Please sign in to comment.