Skip to content

Commit e570c7a

Browse files
Merge pull request #48 from wowsims/feature/hunter
Hunter implementation
2 parents 833065e + e9a29e1 commit e570c7a

64 files changed

Lines changed: 1827 additions & 2626 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

proto/hunter.proto

Lines changed: 47 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -91,55 +91,55 @@ enum HunterStingType {
9191
}
9292

9393
message HunterOptions {
94-
enum Ammo {
95-
AmmoNone = 0;
96-
IcebladeArrow = 1;
97-
SaroniteRazorheads = 2;
98-
TerrorshaftArrow = 3;
99-
TimelessArrow = 4;
100-
MysteriousArrow = 5;
101-
AdamantiteStinger = 6;
102-
BlackflightArrow = 7;
103-
}
104-
Ammo ammo = 1;
105-
10694
enum PetType {
107-
PetNone = 0;
108-
Bat = 1;
109-
Bear = 2;
110-
BirdOfPrey = 3;
111-
Boar = 4;
112-
CarrionBird = 5;
113-
Cat = 6;
114-
Chimaera = 7;
115-
CoreHound = 8;
116-
Crab = 9;
117-
Crocolisk = 10;
118-
Devilsaur = 11;
119-
Dragonhawk = 12;
120-
Gorilla = 13;
121-
Hyena = 14;
122-
Moth = 15;
123-
NetherRay = 16;
124-
Raptor = 17;
125-
Ravager = 18;
126-
Rhino = 19;
127-
Scorpid = 20;
128-
Serpent = 21;
129-
Silithid = 22;
130-
Spider = 23;
131-
SpiritBeast = 24;
132-
SporeBat = 25;
133-
Tallstrider = 26;
134-
Turtle = 27;
135-
WarpStalker = 28;
136-
Wasp = 29;
137-
WindSerpent = 30;
138-
Wolf = 31;
139-
Worm = 32;
140-
ShaleSpider = 33;
141-
Fox = 34;
95+
PetNone = 0;
96+
Bat = 1;
97+
Bear = 2;
98+
BirdOfPrey = 3;
99+
Boar = 4;
100+
CarrionBird = 5;
101+
Cat = 6;
102+
Chimaera = 7;
103+
CoreHound = 8;
104+
Crab = 9;
105+
Crocolisk = 10;
106+
Devilsaur = 11;
107+
Dragonhawk = 12;
108+
Gorilla = 13;
109+
Hyena = 14;
110+
Moth = 15;
111+
NetherRay = 16;
112+
Raptor = 17;
113+
Ravager = 18;
114+
Rhino = 19;
115+
Scorpid = 20;
116+
Serpent = 21;
117+
Silithid = 22;
118+
Spider = 23;
119+
SpiritBeast = 24;
120+
SporeBat = 25;
121+
Tallstrider = 26;
122+
Turtle = 27;
123+
WarpStalker = 28;
124+
Wasp = 29;
125+
WindSerpent = 30;
126+
Wolf = 31;
127+
Worm = 32;
128+
ShaleSpider = 33;
129+
Fox = 34;
130+
131+
// new additions in MoP
132+
Goat = 35;
133+
Porcupine = 36;
134+
Monkey = 37;
135+
Basilisk = 38;
136+
Crane = 39;
137+
Dog = 40;
138+
Beetle = 41;
139+
Quilen = 42;
140+
WaterStrider = 43;
142141
}
142+
143143
PetType pet_type = 2;
144144

145145
PetSpec pet_spec = 3;
@@ -201,21 +201,10 @@ message SurvivalHunter {
201201
RotationType type = 9;
202202
HunterStingType sting = 5;
203203

204-
bool trap_weave = 1;
205-
206-
// Switch to Aspect of the Viper when mana goes below this percent.
207-
double viper_start_mana_percent = 6;
208-
// Switch back to Aspect of the Hawk when mana goes above this percent.
209-
double viper_stop_mana_percent = 7;
210-
211-
// Allow use of Explosive Shot Rank 3 during LNL procs.
212-
bool allow_explosive_shot_downrank = 10;
213-
214204
bool multi_dot_serpent_sting = 11;
215205
}
216206
message Options {
217207
HunterOptions class_options = 1;
218-
double sniper_training_uptime = 2;
219208
}
220209
Options options = 1;
221210
}

sim/core/flags.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ const (
206206
SpellFlagPassiveSpell // Indicates this spell is applied/cast as a result of another spell
207207
SpellFlagSupressDoTApply // If present this spell will not apply dots (Used for DTR dot supression)
208208
SpellFlagSwapped // Indicates that this spell is not useable because it is from a currently swapped item
209+
SpellFlagRanged
209210

210211
// Used to let agents categorize their spells.
211212
SpellFlagAgentReserved1

sim/core/spell_result.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,10 @@ func (spell *Spell) TargetDamageMultiplier(sim *Simulation, attackTable *AttackT
516516
multiplier *= attackTable.Defender.PseudoStats.PeriodicPhysicalDamageTakenMultiplier
517517
}
518518

519+
if spell.Flags.Matches(SpellFlagRanged) {
520+
multiplier *= attackTable.RangedDamageTakenMulitplier
521+
}
522+
519523
if attackTable.DamageDoneByCasterMultiplier != nil {
520524
multiplier *= attackTable.DamageDoneByCasterMultiplier(sim, spell, attackTable)
521525
}

sim/core/target.go

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -215,13 +215,13 @@ type AttackTable struct {
215215
MeleeCritSuppression float64
216216
SpellCritSuppression float64
217217

218-
DamageDealtMultiplier float64 // attacker buff, applied in applyAttackerModifiers()
219-
DamageTakenMultiplier float64 // defender debuff, applied in applyTargetModifiers()
220-
HealingDealtMultiplier float64
221-
IgnoreArmor bool // Ignore defender's armor for specifically this attacker's attacks
222-
ArmorIgnoreFactor float64 // Percentage of armor to ignore for this attacker's attacks
223-
BonusSpellCritPercent float64 // Analagous to Defender.PseudoStats.BonusSpellCritPercentTaken, but only for this attacker specifically
224-
218+
DamageDealtMultiplier float64 // attacker buff, applied in applyAttackerModifiers()
219+
DamageTakenMultiplier float64 // defender debuff, applied in applyTargetModifiers()
220+
HealingDealtMultiplier float64
221+
IgnoreArmor bool // Ignore defender's armor for specifically this attacker's attacks
222+
ArmorIgnoreFactor float64 // Percentage of armor to ignore for this attacker's attacks
223+
BonusSpellCritPercent float64 // Analagous to Defender.PseudoStats.BonusSpellCritPercentTaken, but only for this attacker specifically
224+
RangedDamageTakenMulitplier float64
225225
// This is for "Apply Aura: Mod Damage Done By Caster" effects.
226226
// If set, the damage taken multiplier is multiplied by the callbacks result.
227227
DamageDoneByCasterMultiplier DynamicDamageDoneByCaster
@@ -236,9 +236,10 @@ func NewAttackTable(attacker *Unit, defender *Unit) *AttackTable {
236236
Attacker: attacker,
237237
Defender: defender,
238238

239-
DamageDealtMultiplier: 1,
240-
DamageTakenMultiplier: 1,
241-
HealingDealtMultiplier: 1,
239+
DamageDealtMultiplier: 1,
240+
DamageTakenMultiplier: 1,
241+
RangedDamageTakenMulitplier: 1,
242+
HealingDealtMultiplier: 1,
242243
}
243244

244245
if defender.Type == EnemyUnit {

sim/hunter/_aspects.go

Lines changed: 0 additions & 70 deletions
This file was deleted.

0 commit comments

Comments
 (0)