mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Added Battletide Alchemist
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -834,6 +834,7 @@ res/cardsfolder/b/battlegate_mimic.txt svneol=native#text/plain
|
|||||||
res/cardsfolder/b/battlegrace_angel.txt svneol=native#text/plain
|
res/cardsfolder/b/battlegrace_angel.txt svneol=native#text/plain
|
||||||
res/cardsfolder/b/battleground_geist.txt -text
|
res/cardsfolder/b/battleground_geist.txt -text
|
||||||
res/cardsfolder/b/battlegrowth.txt svneol=native#text/plain
|
res/cardsfolder/b/battlegrowth.txt svneol=native#text/plain
|
||||||
|
res/cardsfolder/b/battletide_alchemist.txt -text
|
||||||
res/cardsfolder/b/battlewand_oak.txt svneol=native#text/plain
|
res/cardsfolder/b/battlewand_oak.txt svneol=native#text/plain
|
||||||
res/cardsfolder/b/battlewise_aven.txt svneol=native#text/plain
|
res/cardsfolder/b/battlewise_aven.txt svneol=native#text/plain
|
||||||
res/cardsfolder/b/batwing_brume.txt -text svneol=unset#text/plain
|
res/cardsfolder/b/batwing_brume.txt -text svneol=unset#text/plain
|
||||||
|
|||||||
9
res/cardsfolder/b/battletide_alchemist.txt
Normal file
9
res/cardsfolder/b/battletide_alchemist.txt
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
Name:Battletide Alchemist
|
||||||
|
ManaCost:3 W W
|
||||||
|
Types:Creature Kithkin Cleric
|
||||||
|
PT:3/4
|
||||||
|
S:Mode$ PreventDamage | Target$ Player | Amount$ AlchemicX | Optional$ True | AILogic$ ProtectFriendly | Description$ If a source would deal damage to a player, you may prevent X of that damage, where X is the number of Clerics you control.
|
||||||
|
SVar:AlchemicX:Count$Valid Cleric.YouCtrl
|
||||||
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/battletide_alchemist.jpg
|
||||||
|
SetInfo:MOR|Rare|http://magiccards.info/scans/en/mt/2.jpg
|
||||||
|
Oracle:If a source would deal damage to a player, you may prevent X of that damage, where X is the number of Clerics you control.
|
||||||
@@ -71,6 +71,16 @@ public class StaticAbilityPreventDamage {
|
|||||||
return restDamage;
|
return restDamage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (params.containsKey("Optional")) { //Assume if param is present it should be optional
|
||||||
|
final String logic = params.containsKey("AILogic") ? params.get("AILogic") : "";
|
||||||
|
final String message = "Apply the effect of " + hostCard + "?";
|
||||||
|
boolean confirmed = hostCard.getController().getController().confirmStaticApplication(hostCard, target, logic, message);
|
||||||
|
|
||||||
|
if (!confirmed) {
|
||||||
|
return restDamage;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// no amount means all
|
// no amount means all
|
||||||
if (!params.containsKey("Amount") || params.get("Amount").equals("All")) {
|
if (!params.containsKey("Amount") || params.get("Amount").equals("All")) {
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ import com.google.common.collect.Iterables;
|
|||||||
import forge.Card;
|
import forge.Card;
|
||||||
import forge.CardLists;
|
import forge.CardLists;
|
||||||
import forge.CardPredicates;
|
import forge.CardPredicates;
|
||||||
|
import forge.GameEntity;
|
||||||
import forge.CardPredicates.Presets;
|
import forge.CardPredicates.Presets;
|
||||||
import forge.Constant;
|
import forge.Constant;
|
||||||
import forge.Singletons;
|
import forge.Singletons;
|
||||||
@@ -691,5 +692,17 @@ public class AiController {
|
|||||||
String exMsg = String.format("AI confirmAction does not know what to decide about %s with %s mode.", api, mode);
|
String exMsg = String.format("AI confirmAction does not know what to decide about %s with %s mode.", api, mode);
|
||||||
throw new InvalidParameterException(exMsg);
|
throw new InvalidParameterException(exMsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean confirmStaticApplication(Card hostCard, GameEntity affected, String logic, String message) {
|
||||||
|
if (logic.equalsIgnoreCase("ProtectFriendly")) {
|
||||||
|
final Player controller = hostCard.getController();
|
||||||
|
if (affected instanceof Player) {
|
||||||
|
return !((Player) affected).isOpponentOf(controller);
|
||||||
|
} else if (affected instanceof Card) {
|
||||||
|
return !((Card) affected).getController().isOpponentOf(controller);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -95,4 +95,5 @@ public abstract class PlayerController {
|
|||||||
public Card chooseSingleCardForEffect(List<Card> sourceList, SpellAbility sa, String title) { return chooseSingleCardForEffect(sourceList, sa, title, false); }
|
public Card chooseSingleCardForEffect(List<Card> sourceList, SpellAbility sa, String title) { return chooseSingleCardForEffect(sourceList, sa, title, false); }
|
||||||
public abstract Card chooseSingleCardForEffect(List<Card> sourceList, SpellAbility sa, String title, boolean isOptional);
|
public abstract Card chooseSingleCardForEffect(List<Card> sourceList, SpellAbility sa, String title, boolean isOptional);
|
||||||
public abstract boolean confirmAction(SpellAbility sa, String mode, String message);
|
public abstract boolean confirmAction(SpellAbility sa, String mode, String message);
|
||||||
|
public abstract boolean confirmStaticApplication(Card hostCard, GameEntity affected, String logic, String message);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -198,4 +198,9 @@ public class PlayerControllerAi extends PlayerController {
|
|||||||
return brains.confirmAction(sa, mode, message);
|
return brains.confirmAction(sa, mode, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean confirmStaticApplication(Card hostCard, GameEntity affected, String logic, String message) {
|
||||||
|
return brains.confirmStaticApplication(hostCard, affected, logic, message);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -245,5 +245,10 @@ public class PlayerControllerHuman extends PlayerController {
|
|||||||
return GuiDialog.confirm(sa.getSourceCard(), message);
|
return GuiDialog.confirm(sa.getSourceCard(), message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean confirmStaticApplication(Card hostCard, GameEntity affected, String logic, String message) {
|
||||||
|
return GuiDialog.confirm(hostCard, message);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user