Skip to content

Commit

Permalink
magmaw progress
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosen Rusinov committed May 11, 2024
1 parent 5b4c27b commit 444ce91
Show file tree
Hide file tree
Showing 12 changed files with 450 additions and 15 deletions.
Binary file modified assets/database/db.bin
Binary file not shown.
3 changes: 2 additions & 1 deletion assets/database/db.json
Original file line number Diff line number Diff line change
Expand Up @@ -10130,7 +10130,8 @@
{"path":"ToGC 25/Gormok","targets":[{"path":"ToGC 25/Gormok","target":{"id":34796,"name":"Gormok","level":83,"mobType":6,"stats":[0,0,0,0,0,0,0,0,0,0,0,805,0,0,0,0,0,0,10643,0,0,0,0,0,0,11853250,0,0,0,0,0,0,0],"minBaseDamage":39600,"damageSpread":0.3333,"swingSpeed":1.5}}]},
{"path":"ToGC 25/Anub'arak","targets":[{"path":"ToGC 25/Anub'arak","target":{"id":34564,"name":"Anub'arak","level":83,"mobType":8,"stats":[0,0,0,0,0,0,0,0,0,0,0,805,0,0,0,0,0,0,10643,0,0,0,0,0,0,27192750,0,0,0,0,0,0,0],"minBaseDamage":58411,"damageSpread":0.45,"swingSpeed":1.5}}]},
{"path":"ICC 25/Sindragosa (Heroic)","targets":[{"path":"ICC 25/Sindragosa (Heroic)","target":{"id":36853,"name":"Sindragosa (Heroic)","level":83,"mobType":8,"stats":[0,0,0,0,0,0,0,0,0,0,0,805,0,0,0,0,0,0,10643,0,0,0,0,0,0,46018500,0,0,0,0,0,0,0],"minBaseDamage":88072,"damageSpread":0.5,"swingSpeed":1.5,"parryHaste":true,"suppressDodge":true,"targetInputs":[{"label":"Include Mystic Buffet","tooltip":"Model the ramping magic damage taken debuff applied during Phase 3 of the encounter, in addition to the normal Phase 1 mechanics."}]}}]},
{"path":"ICC 25/Lich King (Heroic)","targets":[{"path":"ICC 25/Lich King (Heroic)","target":{"id":36597,"name":"Lich King (Heroic)","level":83,"mobType":8,"stats":[0,0,0,0,0,0,0,0,0,0,0,805,0,0,0,0,0,0,10643,0,0,0,0,0,0,103151165,0,0,0,0,0,0,0],"minBaseDamage":146497,"damageSpread":0.1557,"swingSpeed":1.5,"suppressDodge":true}}]}
{"path":"ICC 25/Lich King (Heroic)","targets":[{"path":"ICC 25/Lich King (Heroic)","target":{"id":36597,"name":"Lich King (Heroic)","level":83,"mobType":8,"stats":[0,0,0,0,0,0,0,0,0,0,0,805,0,0,0,0,0,0,10643,0,0,0,0,0,0,103151165,0,0,0,0,0,0,0],"minBaseDamage":146497,"damageSpread":0.1557,"swingSpeed":1.5,"suppressDodge":true}}]},
{"path":"Blackwings Descent/Magmaw","targets":[{"path":"Blackwings Descent/Magmaw","target":{"id":41570,"name":"Magmaw","level":88,"mobType":1,"stats":[0,0,0,0,0,0,0,0,0,0,0,650,0,0,0,0,0,0,11977,0,0,0,0,0,0,120000000,0,0,0,0,0,0,0],"minBaseDamage":209609,"damageSpread":0.4,"swingSpeed":2.5,"targetInputs":[{"inputType":2,"label":"Size","tooltip":"The size of the Raid","enumValue":1,"enumOptions":["10","25"]},{"label":"Heroic","tooltip":"Is the encounter in Heroic Mode","boolValue":true},{"inputType":1,"label":"Impale Reaction Time","tooltip":"How long will the Raid take to Impale Head in Seconds. (After the initial 10s)","numberValue":5}]}}]}
],
"glyphIds":[
{"itemId":40919,"spellId":54830},
Expand Down
4 changes: 4 additions & 0 deletions proto/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,7 @@ enum MobType {
enum InputType {
Bool = 0;
Number = 1;
Enum = 2;
}

message TargetInput {
Expand All @@ -631,6 +632,9 @@ message TargetInput {

bool bool_value = 3;
double number_value = 4;

int32 enum_value = 6;
repeated string enum_options = 7;
}

message Target {
Expand Down
2 changes: 1 addition & 1 deletion sim/core/attack.go
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ func (aa *AutoAttacks) StopRangedUntil(sim *Simulation, readyAt time.Duration) {
sim.rescheduleWeaponAttack(aa.ranged.swingAt)
}

// Delays all swing timers for the specified amount. Only used by Slam.
// Delays all swing timers for the specified amount.
func (aa *AutoAttacks) DelayMeleeBy(sim *Simulation, delay time.Duration) {
if delay <= 0 {
return
Expand Down
20 changes: 10 additions & 10 deletions sim/core/target.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,6 @@ func NewEncounter(options *proto.Encounter) Encounter {
ExecuteProportion_90: max(options.ExecuteProportion_90, 0),
Targets: []*Target{},
}
// If UseHealth is set, we use the sum of targets health.
if options.UseHealth {
for _, t := range options.Targets {
encounter.EndFightAtHealth += t.Stats[stats.Health]
}
if encounter.EndFightAtHealth == 0 {
encounter.EndFightAtHealth = 1 // default to something so we don't instantly end without anything.
}
}

for targetIndex, targetOptions := range options.Targets {
target := NewTarget(targetOptions, int32(targetIndex))
encounter.Targets = append(encounter.Targets, target)
Expand All @@ -66,6 +56,16 @@ func NewEncounter(options *proto.Encounter) Encounter {
encounter.TargetUnits = append(encounter.TargetUnits, &target.Unit)
}

// If UseHealth is set, we use the sum of targets health. After creating the targets to make sure stat modifications are done
if options.UseHealth {
for _, t := range options.Targets {
encounter.EndFightAtHealth += t.Stats[stats.Health]
}
if encounter.EndFightAtHealth == 0 {
encounter.EndFightAtHealth = 1 // default to something so we don't instantly end without anything.
}
}

if encounter.EndFightAtHealth > 0 {
// Until we pre-sim set duration to 10m
encounter.Duration = time.Minute * 10
Expand Down
5 changes: 5 additions & 0 deletions sim/encounters/bwd/bwd.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package bwd

func Register() {
addMagmaw("Blackwings Descent")
}
Loading

0 comments on commit 444ce91

Please sign in to comment.