mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
Merge branch 'oxplow' into 'master'
KHM - new keyword for farm animals See merge request core-developers/forge!3694
This commit is contained in:
@@ -1179,7 +1179,7 @@ public class AiAttackController {
|
|||||||
CardPredicates.hasKeyword(Keyword.LIFELINK))).isEmpty();
|
CardPredicates.hasKeyword(Keyword.LIFELINK))).isEmpty();
|
||||||
|
|
||||||
// total power of the defending creatures, used in predicting whether a gang block can kill the attacker
|
// total power of the defending creatures, used in predicting whether a gang block can kill the attacker
|
||||||
int defPower = CardLists.getTotalPower(validBlockers, true);
|
int defPower = CardLists.getTotalPower(validBlockers, true, false);
|
||||||
|
|
||||||
if (!hasCombatEffect) {
|
if (!hasCombatEffect) {
|
||||||
for (KeywordInterface inst : attacker.getKeywords()) {
|
for (KeywordInterface inst : attacker.getKeywords()) {
|
||||||
|
|||||||
@@ -401,11 +401,15 @@ public class CardLists {
|
|||||||
*
|
*
|
||||||
* @param cardList the list of creature cards for which to sum the power
|
* @param cardList the list of creature cards for which to sum the power
|
||||||
* @param ignoreNegativePower if true, treats negative power as 0
|
* @param ignoreNegativePower if true, treats negative power as 0
|
||||||
|
* @param crew for cards that crew with toughness rather than power
|
||||||
*/
|
*/
|
||||||
public static int getTotalPower(Iterable<Card> cardList, boolean ignoreNegativePower) {
|
public static int getTotalPower(Iterable<Card> cardList, boolean ignoreNegativePower, boolean crew) {
|
||||||
int total = 0;
|
int total = 0;
|
||||||
for (final Card crd : cardList) {
|
for (final Card crd : cardList) {
|
||||||
total += ignoreNegativePower ? Math.max(0, crd.getNetPower()) : crd.getNetPower();
|
if (crew && crd.hasKeyword("CARDNAME crews Vehicles using its toughness rather than its power.")) {
|
||||||
|
total += ignoreNegativePower ? Math.max(0, crd.getNetToughness()) : crd.getNetToughness();
|
||||||
|
}
|
||||||
|
else total += ignoreNegativePower ? Math.max(0, crd.getNetPower()) : crd.getNetPower();
|
||||||
}
|
}
|
||||||
return total;
|
return total;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ public class CostTapType extends CostPartWithList {
|
|||||||
|
|
||||||
if (totalPower) {
|
if (totalPower) {
|
||||||
final int i = Integer.parseInt(totalP);
|
final int i = Integer.parseInt(totalP);
|
||||||
return CardLists.getTotalPower(typeList, true) >= i;
|
return CardLists.getTotalPower(typeList, true, ability.hasParam("Crew")) >= i;
|
||||||
}
|
}
|
||||||
|
|
||||||
final Integer amount = this.convertAmount();
|
final Integer amount = this.convertAmount();
|
||||||
|
|||||||
12
forge-gui/res/cardsfolder/upcoming/colossal_plow.txt
Normal file
12
forge-gui/res/cardsfolder/upcoming/colossal_plow.txt
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
Name:Colossal Plow
|
||||||
|
ManaCost:2
|
||||||
|
Types:Artifact Vehicle
|
||||||
|
PT:6/3
|
||||||
|
T:Mode$ Attacks | ValidCard$ Card.Self | Execute$ TrigMana | TriggerDescription$ Whenever CARDNAME attacks, add {W}{W}{W} and you gain 3 life. Until end of turn, you don't lose this mana as steps and phases end.
|
||||||
|
SVar:TrigMana:DB$ Mana | Produced$ W W W | PersistentMana$ True | SubAbility$ DBGainLife
|
||||||
|
SVar:DBGainLife:DB$ GainLife | Defined$ You | LifeAmount$ 3
|
||||||
|
K:Crew:6
|
||||||
|
SVar:HasAttackEffect:TRUE
|
||||||
|
DeckHas:Ability$LifeGain
|
||||||
|
DeckHints:Color$White
|
||||||
|
Oracle:Whenever Colossal Plow attacks, add {W}{W}{W} and you gain 3 life. Until end of turn, you don’t lose this mana as steps and phases end.\nCrew 6 (Tap any number of creatures you control with total power 6 or more: This Vehicle becomes an artifact creature until end of turn.)
|
||||||
7
forge-gui/res/cardsfolder/upcoming/giant_ox.txt
Normal file
7
forge-gui/res/cardsfolder/upcoming/giant_ox.txt
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
Name:Giant Ox
|
||||||
|
ManaCost:1 W
|
||||||
|
Types:Creature Ox
|
||||||
|
PT:0/6
|
||||||
|
K:CARDNAME crews Vehicles using its toughness rather than its power.
|
||||||
|
DeckHints:Type$Vehicle
|
||||||
|
Oracle:Giant Ox crews Vehicles using its toughness rather than its power.
|
||||||
@@ -1247,7 +1247,7 @@ public class HumanCostDecision extends CostDecisionMakerBase {
|
|||||||
inp.setCancelAllowed(true);
|
inp.setCancelAllowed(true);
|
||||||
inp.showAndWait();
|
inp.showAndWait();
|
||||||
|
|
||||||
if (inp.hasCancelled() || CardLists.getTotalPower(inp.getSelected(), true) < i) {
|
if (inp.hasCancelled() || CardLists.getTotalPower(inp.getSelected(), true, ability.hasParam("Crew")) < i) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return PaymentDecision.card(inp.getSelected());
|
return PaymentDecision.card(inp.getSelected());
|
||||||
|
|||||||
Reference in New Issue
Block a user