Skip to content

Commit

Permalink
Fix curse of doom and agony overlapping
Browse files Browse the repository at this point in the history
  • Loading branch information
lologarithm committed May 4, 2022
1 parent 8560e38 commit dcb3d3d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion sim/warlock/rotations.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ func (warlock *Warlock) tryUseGCD(sim *core.Simulation) {
warlock.AmplifyCurse.Cast(sim, sim.GetPrimaryTarget())
}
if sim.Duration-sim.CurrentTime < time.Minute {
if sim.Duration-sim.CurrentTime > time.Second*30 && !warlock.CurseOfAgonyDot.IsActive() {
// Can't cast agony until we are at end and both agony and doom are not ticking.
if sim.Duration-sim.CurrentTime > time.Second*30 && !warlock.CurseOfAgonyDot.IsActive() && !warlock.CurseOfDoomDot.IsActive() {
spell = warlock.CurseOfAgony
}
} else if warlock.CurseOfDoom.CD.IsReady(sim) && !warlock.CurseOfDoomDot.IsActive() {
Expand Down
7 changes: 4 additions & 3 deletions sim/web/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,15 @@ func main() {
body, err := ioutil.ReadAll(resp.Body)

result := struct {
Tag string `json:"tag_name"`
URL string `json:"html_url"`
Tag string `json:"tag_name"`
URL string `json:"html_url"`
Name string `json:"name"`
}{}
json.Unmarshal(body, &result)

if result.Tag != Version {
outdated = 2
fmt.Printf("New version of simulator available: %s\n", result.URL)
fmt.Printf("New version of simulator available: %s\n\tDownload at: %s\n", result.Name, result.URL)
} else {
outdated = 1
}
Expand Down

0 comments on commit dcb3d3d

Please sign in to comment.