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