mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Fixing merge issues for AbilityFactory
This commit is contained in:
@@ -57,6 +57,11 @@ public class AbilityFactory {
|
|||||||
return abTgt;
|
return abTgt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean isCurse = false;
|
||||||
|
public boolean isCurse(){
|
||||||
|
return isCurse;
|
||||||
|
}
|
||||||
|
|
||||||
private boolean hasSubAb = false;
|
private boolean hasSubAb = false;
|
||||||
|
|
||||||
public boolean hasSubAbility()
|
public boolean hasSubAbility()
|
||||||
@@ -123,9 +128,6 @@ public class AbilityFactory {
|
|||||||
{
|
{
|
||||||
hasValid = true;
|
hasValid = true;
|
||||||
isTargeted = true;
|
isTargeted = true;
|
||||||
abTgt = new Target("TgtV");
|
|
||||||
abTgt.setValidTgts(mapParams.get("ValidTgts").split(","));
|
|
||||||
abTgt.setVTSelection(mapParams.get("TgtPrompt"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mapParams.containsKey("ValidCards"))
|
if (mapParams.containsKey("ValidCards"))
|
||||||
@@ -134,9 +136,17 @@ public class AbilityFactory {
|
|||||||
if (mapParams.containsKey("Tgt"))
|
if (mapParams.containsKey("Tgt"))
|
||||||
{
|
{
|
||||||
isTargeted = true;
|
isTargeted = true;
|
||||||
abTgt = new Target(mapParams.get("Tgt"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isTargeted)
|
||||||
|
{
|
||||||
|
if (hasValid)
|
||||||
|
abTgt = new Target("TgtV", mapParams.get("TgtPrompt"), mapParams.get("ValidTgts").split(","));
|
||||||
|
else
|
||||||
|
abTgt = new Target(mapParams.get("Tgt"));
|
||||||
|
}
|
||||||
|
|
||||||
|
isCurse = mapParams.containsKey("IsCurse");
|
||||||
|
|
||||||
hasSubAb = mapParams.containsKey("SubAbility");
|
hasSubAb = mapParams.containsKey("SubAbility");
|
||||||
|
|
||||||
@@ -170,19 +180,24 @@ public class AbilityFactory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// additional API keywords here
|
// additional API keywords here
|
||||||
|
if (API.equals("PutCounter")){
|
||||||
|
if (isAb)
|
||||||
|
SA = AbilityFactory_Counters.createAbilityPutCounters(this);
|
||||||
|
if (isSp){
|
||||||
|
// todo: createSpellPutCounters
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// *********************************************
|
// *********************************************
|
||||||
// set universal properties of the SpellAbility
|
// set universal properties of the SpellAbility
|
||||||
if (isTargeted)
|
if (isSp){
|
||||||
{
|
// Ability_Activated sets abTgt and abCost in the constructor so this only needs to be set for Spells
|
||||||
//if (isAb)
|
// Once Spell constructors set Tgt and abCost this block should be removed
|
||||||
SA.setTarget(abTgt);
|
if (isTargeted)
|
||||||
|
SA.setTarget(abTgt);
|
||||||
|
|
||||||
}
|
SA.setPayCosts(abCost);
|
||||||
|
}
|
||||||
//if (isAb)
|
|
||||||
SA.setPayCosts(abCost);
|
|
||||||
|
|
||||||
if (hasSpDesc)
|
if (hasSpDesc)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user