mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
Regeneration Rework:
- Regenerate or RegenerateAll does create an Effect in Command which does replace Destroy if possible - Trigger Regenerated will be added to the Effect if something does care about "regenerated that way" - new Regeneration Api is the internal effect that does handle the actual regeneration - ReplaceDestroy has Section to handle if Regeneration is possible - CardShields are removed with the option in PlayerController
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
package forge.ai;
|
||||
|
||||
import com.esotericsoftware.minlog.Log;
|
||||
//import com.esotericsoftware.minlog.Log;
|
||||
import com.google.common.base.Predicate;
|
||||
import com.google.common.base.Predicates;
|
||||
import com.google.common.collect.Iterables;
|
||||
@@ -398,7 +398,7 @@ public class PlayerControllerAi extends PlayerController {
|
||||
if (StringUtils.isBlank(chosen) && !validTypes.isEmpty())
|
||||
{
|
||||
chosen = validTypes.get(0);
|
||||
Log.warn("AI has no idea how to choose " + kindOfType +", defaulting to 1st element: chosen");
|
||||
//Log.warn("AI has no idea how to choose " + kindOfType +", defaulting to 1st element: chosen");
|
||||
}
|
||||
game.getAction().nofityOfValue(sa, player, chosen, player);
|
||||
return chosen;
|
||||
@@ -866,11 +866,6 @@ public class PlayerControllerAi extends PlayerController {
|
||||
return brains.getBooleanProperty(AiProps.CHEAT_WITH_MANA_ON_SHUFFLE) ? brains.cheatShuffle(list) : list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CardShields chooseRegenerationShield(Card c) {
|
||||
return Iterables.getFirst(c.getShields(), null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PaperCard> chooseCardsYouWonToAddToDeck(List<PaperCard> losses) {
|
||||
// TODO AI takes all by default
|
||||
|
||||
@@ -117,6 +117,7 @@ public enum SpellApiToAi {
|
||||
.put(ApiType.RearrangeTopOfLibrary, RearrangeTopOfLibraryAi.class)
|
||||
.put(ApiType.Regenerate, RegenerateAi.class)
|
||||
.put(ApiType.RegenerateAll, RegenerateAllAi.class)
|
||||
.put(ApiType.Regeneration, AlwaysPlayAi.class)
|
||||
.put(ApiType.RemoveCounter, CountersRemoveAi.class)
|
||||
.put(ApiType.RemoveCounterAll, CannotPlayAi.class)
|
||||
.put(ApiType.RemoveFromCombat, RemoveFromCombatAi.class)
|
||||
|
||||
Reference in New Issue
Block a user