v2.0.0: fixed load delay on non-static buffs rarely triggering incorrectly
This commit is contained in:
+3
-1
@@ -292,7 +292,9 @@ abstract public class ClassArmor extends Armor {
|
|||||||
public boolean attachTo( Char target ) {
|
public boolean attachTo( Char target ) {
|
||||||
if (super.attachTo( target )) {
|
if (super.attachTo( target )) {
|
||||||
//if we're loading in and the hero has partially spent a turn, delay for 1 turn
|
//if we're loading in and the hero has partially spent a turn, delay for 1 turn
|
||||||
if (now() == 0 && cooldown() == 0 && target.cooldown() > 0) spend(TICK);
|
if (target instanceof Hero && Dungeon.hero == null && cooldown() == 0 && target.cooldown() > 0) {
|
||||||
|
spend(TICK);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
+3
-1
@@ -220,7 +220,9 @@ public class Artifact extends KindofMisc {
|
|||||||
public boolean attachTo( Char target ) {
|
public boolean attachTo( Char target ) {
|
||||||
if (super.attachTo( target )) {
|
if (super.attachTo( target )) {
|
||||||
//if we're loading in and the hero has partially spent a turn, delay for 1 turn
|
//if we're loading in and the hero has partially spent a turn, delay for 1 turn
|
||||||
if (now() == 0 && cooldown() == 0 && target.cooldown() > 0) spend(TICK);
|
if (target instanceof Hero && Dungeon.hero == null && cooldown() == 0 && target.cooldown() > 0) {
|
||||||
|
spend(TICK);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -344,7 +344,9 @@ public class Ring extends KindofMisc {
|
|||||||
public boolean attachTo( Char target ) {
|
public boolean attachTo( Char target ) {
|
||||||
if (super.attachTo( target )) {
|
if (super.attachTo( target )) {
|
||||||
//if we're loading in and the hero has partially spent a turn, delay for 1 turn
|
//if we're loading in and the hero has partially spent a turn, delay for 1 turn
|
||||||
if (now() == 0 && cooldown() == 0 && target.cooldown() > 0) spend(TICK);
|
if (target instanceof Hero && Dungeon.hero == null && cooldown() == 0 && target.cooldown() > 0) {
|
||||||
|
spend(TICK);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -680,7 +680,9 @@ public abstract class Wand extends Item {
|
|||||||
public boolean attachTo( Char target ) {
|
public boolean attachTo( Char target ) {
|
||||||
if (super.attachTo( target )) {
|
if (super.attachTo( target )) {
|
||||||
//if we're loading in and the hero has partially spent a turn, delay for 1 turn
|
//if we're loading in and the hero has partially spent a turn, delay for 1 turn
|
||||||
if (now() == 0 && cooldown() == 0 && target.cooldown() > 0) spend(TICK);
|
if (target instanceof Hero && Dungeon.hero == null && cooldown() == 0 && target.cooldown() > 0) {
|
||||||
|
spend(TICK);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user