mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
Code review updatse
This commit is contained in:
@@ -163,7 +163,7 @@ public class MillAi extends SpellAbilityAi {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AiAbilityDecision chkAIDrawback(SpellAbility sa, Player aiPlayer) {
|
public AiAbilityDecision chkAIDrawback(SpellAbility sa, Player aiPlayer) {
|
||||||
return targetAI(aiPlayer, sa, true) ? new AiAbilityDecision(100, forge.ai.AiPlayDecision.WillPlay) : new AiAbilityDecision(0, forge.ai.AiPlayDecision.CantPlayAi);
|
return targetAI(aiPlayer, sa, true) ? new AiAbilityDecision(100, AiPlayDecision.WillPlay) : new AiAbilityDecision(0, AiPlayDecision.CantPlayAi);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -151,11 +151,8 @@ public class PumpAllAi extends PumpAiBase {
|
|||||||
|
|
||||||
// important to call canPlay first so targets are added if needed
|
// important to call canPlay first so targets are added if needed
|
||||||
AiAbilityDecision decision = canPlayAI(ai, sa);
|
AiAbilityDecision decision = canPlayAI(ai, sa);
|
||||||
if (decision == null) {
|
if (mandatory && decision.decision().willingToPlay()) {
|
||||||
return mandatory ? new AiAbilityDecision(100, AiPlayDecision.WillPlay) : new AiAbilityDecision(0, AiPlayDecision.CantPlayAi);
|
return new AiAbilityDecision(50, AiPlayDecision.MandatoryPlay);
|
||||||
}
|
|
||||||
if (mandatory && decision.decision() != AiPlayDecision.WillPlay) {
|
|
||||||
return new AiAbilityDecision(100, AiPlayDecision.WillPlay);
|
|
||||||
}
|
}
|
||||||
return decision;
|
return decision;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,8 +23,6 @@ public class RollPlanarDiceAi extends SpellAbilityAi {
|
|||||||
for (Card c : ai.getGame().getActivePlanes()) {
|
for (Card c : ai.getGame().getActivePlanes()) {
|
||||||
if (willRollOnPlane(ai, c)) {
|
if (willRollOnPlane(ai, c)) {
|
||||||
return new AiAbilityDecision(100, AiPlayDecision.WillPlay);
|
return new AiAbilityDecision(100, AiPlayDecision.WillPlay);
|
||||||
} else {
|
|
||||||
return new AiAbilityDecision(0, AiPlayDecision.CantPlayAi);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return new AiAbilityDecision(0, AiPlayDecision.CantPlayAi);
|
return new AiAbilityDecision(0, AiPlayDecision.CantPlayAi);
|
||||||
|
|||||||
Reference in New Issue
Block a user