mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 10:18:01 +00:00
- Rudimentary prediction for Insult // Injury double damage effect for the AI (currently done in a way similar to how several other effects are predicted, which is (a) suboptimal - needs to be figured out from the replacement effect itself; (b) needs to be moved out from the Card and Player classes into the AI class, probably ComputerUtilCombat). Feel free to improve.
This commit is contained in:
@@ -6053,6 +6053,16 @@ public class Card extends GameEntity implements Comparable<Card> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: improve such that this can be predicted from the replacement effect itself
|
||||||
|
// (+ move this function out into ComputerUtilCombat?)
|
||||||
|
for (Card c : getGame().getCardsIn(ZoneType.Command)) {
|
||||||
|
if (c.getName().equals("Insult Effect")) {
|
||||||
|
if (c.getController().equals(source.getController())) {
|
||||||
|
restDamage *= 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (getName().equals("Phytohydra")) {
|
if (getName().equals("Phytohydra")) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -721,6 +721,17 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: improve such that this can be predicted from the replacement effect itself
|
||||||
|
// (+ move this function out into ComputerUtilCombat?)
|
||||||
|
for (Card c : game.getCardsIn(ZoneType.Command)) {
|
||||||
|
if (c.getName().equals("Insult Effect")) {
|
||||||
|
if (c.getController().equals(source.getController())) {
|
||||||
|
restDamage *= 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return restDamage;
|
return restDamage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user