mirror of
https://github.com/correl/mage.git
synced 2024-11-14 19:19:32 +00:00
Added generation code for the enchant keyword to the script
This commit is contained in:
parent
246469ee48
commit
8693b50f4f
2 changed files with 28 additions and 1 deletions
|
@ -227,11 +227,31 @@ foreach my $ability (@abilities) {
|
|||
$ability =~ m/({.*})/g;
|
||||
$vars{'abilities'} .= "\n this.addAbility(new " . $kw . 'Ability(this, new ManaCostsImpl("' . fixCost($1) . '")));';
|
||||
$vars{'abilitiesImports'} .= "\nimport mage.abilities.costs.mana.ManaCostsImpl;";
|
||||
} elsif ($keywords{$kw} eq 'type') {
|
||||
$ability =~ m/\s([a-zA-Z\s]*)/g;
|
||||
if ($1 =~ m/(^.*\s.*)/g) {
|
||||
$vars{'abilities'} .= "\n TargetPermanent auraTarget = new TargetPermanent(filter);";
|
||||
} else {
|
||||
$vars{'abilities'} .= "\n TargetPermanent auraTarget = new Target". toCamelCase($1) . "Permanent();";
|
||||
$vars{'abilitiesImports'} .= "\nimport mage.target.common.Target". toCamelCase($1) . "Permanent;";
|
||||
}
|
||||
$vars{'abilities'} .= "\n this.getSpellAbility().addTarget(auraTarget);";
|
||||
$vars{'abilities'} .= "\n this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));";
|
||||
$vars{'abilities'} .= "\n Ability ability = new EnchantAbility(auraTarget.getTargetName());";
|
||||
$vars{'abilities'} .= "\n this.addAbility(ability);";
|
||||
$vars{'abilitiesImports'} .= "\nimport mage.abilities.Ability;";
|
||||
$vars{'abilitiesImports'} .= "\nimport mage.abilities.effects.common.AttachEffect;";
|
||||
$vars{'abilitiesImports'} .= "\nimport mage.constants.Outcome;";
|
||||
$vars{'abilitiesImports'} .= "\nimport mage.target.TargetPermanent;";
|
||||
} elsif ($keywords{$kw} eq 'manaString') {
|
||||
$ability =~ m/({.*})/g;
|
||||
$vars{'abilities'} .= "\n this.addAbility(new " . $kw . 'Ability("' . fixCost($1) . '"));';
|
||||
}
|
||||
$vars{'abilitiesImports'} .= "\nimport mage.abilities.keyword." . $kw . "Ability;";
|
||||
} else {
|
||||
$vars{'abilities'} .= "\n // $kwUnchanged";
|
||||
}
|
||||
$vars{'abilities'} .= "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
Annihilator|number|
|
||||
Basic landcycling|cost|
|
||||
Battle cry|new|
|
||||
Bestow|card, manaString|
|
||||
Bloodthirst|number|
|
||||
Bushido|number|
|
||||
Convoke|new|
|
||||
Buyback|manaString|
|
||||
Cascade|new|
|
||||
Changeling|instance|
|
||||
Convoke|new|
|
||||
Crew|number|
|
||||
Cumulative upkeep|cost|
|
||||
Cycling|cost|
|
||||
|
@ -14,10 +17,14 @@ Delve|new|
|
|||
Dethrone|new|
|
||||
Devoid|color|
|
||||
Defender|instance|
|
||||
Dredge|number|
|
||||
Double Strike|instance|
|
||||
Dredge|number|
|
||||
Echo|manaString|
|
||||
Enchant|type|
|
||||
Entwine|manaString|
|
||||
Evoke|card, manaString|
|
||||
Evolve|new|
|
||||
Exalted|new|
|
||||
Exploit|new|
|
||||
Extort|new|
|
||||
|
|
Loading…
Reference in a new issue