Some changes with the brainstormed jass abilities api

This commit is contained in:
Retera 2022-06-11 20:27:14 -04:00
parent 602fa3cd2a
commit 9216bbd42d
4 changed files with 167 additions and 132 deletions

View File

@ -91,7 +91,7 @@ import com.etheller.warsmash.viewer5.handlers.w3x.simulation.abilities.types.CAb
import com.etheller.warsmash.viewer5.handlers.w3x.simulation.abilities.types.jass.BehaviorExpr; import com.etheller.warsmash.viewer5.handlers.w3x.simulation.abilities.types.jass.BehaviorExpr;
import com.etheller.warsmash.viewer5.handlers.w3x.simulation.abilities.types.jass.CAbilityTypeJassDefinition; import com.etheller.warsmash.viewer5.handlers.w3x.simulation.abilities.types.jass.CAbilityTypeJassDefinition;
import com.etheller.warsmash.viewer5.handlers.w3x.simulation.abilities.types.jass.CAbilityTypeJassDefinition.JassOrder; import com.etheller.warsmash.viewer5.handlers.w3x.simulation.abilities.types.jass.CAbilityTypeJassDefinition.JassOrder;
import com.etheller.warsmash.viewer5.handlers.w3x.simulation.abilities.types.jass.CAbilityTypeJassDefinition.JassOrderCommandCardType; import com.etheller.warsmash.viewer5.handlers.w3x.simulation.abilities.types.jass.CAbilityTypeJassDefinition.JassOrderButtonType;
import com.etheller.warsmash.viewer5.handlers.w3x.simulation.ai.AIDifficulty; import com.etheller.warsmash.viewer5.handlers.w3x.simulation.ai.AIDifficulty;
import com.etheller.warsmash.viewer5.handlers.w3x.simulation.behaviors.CBehaviorAttackListener; import com.etheller.warsmash.viewer5.handlers.w3x.simulation.behaviors.CBehaviorAttackListener;
import com.etheller.warsmash.viewer5.handlers.w3x.simulation.config.CPlayerAPI; import com.etheller.warsmash.viewer5.handlers.w3x.simulation.config.CPlayerAPI;
@ -612,10 +612,11 @@ public class Jass2 {
// Warsmash Ability API // Warsmash Ability API
final HandleJassType abilitytypeType = globals.registerHandleType("abilitytype"); final HandleJassType abilitytypeType = globals.registerHandleType("abilitytype");
final HandleJassType ordercommandcardType = globals.registerHandleType("ordercommandcard"); final HandleJassType orderbuttonType = globals.registerHandleType("orderbutton");
final HandleJassType ordercommandcardtypeType = globals.registerHandleType("ordercommandcardtype"); final HandleJassType orderbuttontypeType = globals.registerHandleType("orderbuttontype");
final HandleJassType abilitybehaviorType = globals.registerHandleType("abilitybehavior"); final HandleJassType abilitybehaviorType = globals.registerHandleType("abilitybehavior");
final HandleJassType behaviorexprType = globals.registerHandleType("behaviorexpr"); final HandleJassType behaviorexprType = globals.registerHandleType("behaviorexpr");
final HandleJassType iconuiType = globals.registerHandleType("iconui");
registerTypingNatives(jassProgramVisitor, raceType, alliancetypeType, racepreferenceType, igamestateType, registerTypingNatives(jassProgramVisitor, raceType, alliancetypeType, racepreferenceType, igamestateType,
fgamestateType, playerstateType, playerscoreType, playergameresultType, unitstateType, fgamestateType, playerstateType, playerscoreType, playergameresultType, unitstateType,
@ -625,12 +626,12 @@ public class Jass2 {
volumegroupType, camerafieldType, playercolorType, placementType, startlocprioType, volumegroupType, camerafieldType, playercolorType, placementType, startlocprioType,
raritycontrolType, blendmodeType, texmapflagsType, effecttypeType, fogstateType, versionType, raritycontrolType, blendmodeType, texmapflagsType, effecttypeType, fogstateType, versionType,
itemtypeType, attacktypeType, damagetypeType, weapontypeType, soundtypeType, pathingtypeType); itemtypeType, attacktypeType, damagetypeType, weapontypeType, soundtypeType, pathingtypeType);
jassProgramVisitor.getJassNativeManager().createNative("ConvertOrderCommandCardType", new JassFunction() { jassProgramVisitor.getJassNativeManager().createNative("ConvertOrderButtonType", new JassFunction() {
@Override @Override
public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope, public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope,
final TriggerExecutionScope triggerScope) { final TriggerExecutionScope triggerScope) {
final int i = arguments.get(0).visit(IntegerJassValueVisitor.getInstance()); final int i = arguments.get(0).visit(IntegerJassValueVisitor.getInstance());
return new HandleJassValue(ordercommandcardtypeType, JassOrderCommandCardType.VALUES[i]); return new HandleJassValue(orderbuttontypeType, JassOrderButtonType.VALUES[i]);
} }
}); });
@ -4048,20 +4049,18 @@ public class Jass2 {
return new IntegerJassValue(((CommonTriggerExecutionScope) triggerScope).getSpellAbilityOrderId()); return new IntegerJassValue(((CommonTriggerExecutionScope) triggerScope).getSpellAbilityOrderId());
} }
}); });
jassProgramVisitor.getJassNativeManager().createNative("GetSpellAbilityOrderCommandCard", jassProgramVisitor.getJassNativeManager().createNative("GetSpellAbilityOrderButton", new JassFunction() {
new JassFunction() { @Override
@Override public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope,
public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope, final TriggerExecutionScope triggerScope) {
final TriggerExecutionScope triggerScope) { return new IntegerJassValue(((CommonTriggerExecutionScope) triggerScope).getSpellAbilityOrderId());
return new IntegerJassValue( }
((CommonTriggerExecutionScope) triggerScope).getSpellAbilityOrderId()); });
}
});
jassProgramVisitor.getJassNativeManager().createNative("GetSpellTargetType", new JassFunction() { jassProgramVisitor.getJassNativeManager().createNative("GetSpellTargetType", new JassFunction() {
@Override @Override
public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope, public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope,
final TriggerExecutionScope triggerScope) { final TriggerExecutionScope triggerScope) {
return new HandleJassValue(ordercommandcardtypeType, return new HandleJassValue(orderbuttontypeType,
((CommonTriggerExecutionScope) triggerScope).getSpellAbilityTargetType()); ((CommonTriggerExecutionScope) triggerScope).getSpellAbilityTargetType());
} }
}); });
@ -4215,56 +4214,97 @@ public class Jass2 {
return null; return null;
} }
}); });
jassProgramVisitor.getJassNativeManager().createNative("CreateOrderCommandCard", new JassFunction() { jassProgramVisitor.getJassNativeManager().createNative("GetUnitIconUI", new JassFunction() {
@Override @Override
public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope, public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope,
final TriggerExecutionScope triggerScope) { final TriggerExecutionScope triggerScope) {
final JassOrderCommandCardType type = arguments.get(0).visit(ObjectJassValueVisitor.getInstance()); final int rawcode = arguments.get(0).visit(IntegerJassValueVisitor.getInstance());
return new HandleJassValue(iconuiType,
war3MapViewer.getAbilityDataUI().getUnitUI(new War3ID(rawcode)));
}
});
jassProgramVisitor.getJassNativeManager().createNative("GetAbilityOnIconUI", new JassFunction() {
@Override
public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope,
final TriggerExecutionScope triggerScope) {
final int rawcode = arguments.get(0).visit(IntegerJassValueVisitor.getInstance());
return new HandleJassValue(iconuiType,
war3MapViewer.getAbilityDataUI().getUI(new War3ID(rawcode)).getOnIconUI());
}
});
jassProgramVisitor.getJassNativeManager().createNative("GetAbilityOffIconUI", new JassFunction() {
@Override
public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope,
final TriggerExecutionScope triggerScope) {
final int rawcode = arguments.get(0).visit(IntegerJassValueVisitor.getInstance());
return new HandleJassValue(iconuiType,
war3MapViewer.getAbilityDataUI().getUI(new War3ID(rawcode)).getOffIconUI());
}
});
jassProgramVisitor.getJassNativeManager().createNative("GetAbilityLearnIconUI", new JassFunction() {
@Override
public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope,
final TriggerExecutionScope triggerScope) {
final int rawcode = arguments.get(0).visit(IntegerJassValueVisitor.getInstance());
return new HandleJassValue(iconuiType,
war3MapViewer.getAbilityDataUI().getUI(new War3ID(rawcode)).getLearnIconUI());
}
});
jassProgramVisitor.getJassNativeManager().createNative("GetItemIconUI", new JassFunction() {
@Override
public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope,
final TriggerExecutionScope triggerScope) {
final int rawcode = arguments.get(0).visit(IntegerJassValueVisitor.getInstance());
return new HandleJassValue(iconuiType,
war3MapViewer.getAbilityDataUI().getItemUI(new War3ID(rawcode)));
}
});
jassProgramVisitor.getJassNativeManager().createNative("CreateOrderButton", new JassFunction() {
@Override
public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope,
final TriggerExecutionScope triggerScope) {
final JassOrderButtonType type = arguments.get(0).visit(ObjectJassValueVisitor.getInstance());
final int orderId = arguments.get(1).visit(IntegerJassValueVisitor.getInstance()); final int orderId = arguments.get(1).visit(IntegerJassValueVisitor.getInstance());
final int buttonPositionX = arguments.get(2).visit(IntegerJassValueVisitor.getInstance()); final int buttonPositionX = arguments.get(2).visit(IntegerJassValueVisitor.getInstance());
final int buttonPositionY = arguments.get(3).visit(IntegerJassValueVisitor.getInstance()); final int buttonPositionY = arguments.get(3).visit(IntegerJassValueVisitor.getInstance());
final JassOrder javaValue = new JassOrder(orderId, buttonPositionX, buttonPositionY); final JassOrder javaValue = new JassOrder(orderId, buttonPositionX, buttonPositionY);
javaValue.setType(type); javaValue.setType(type);
return new HandleJassValue(ordercommandcardType, javaValue); return new HandleJassValue(orderbuttonType, javaValue);
} }
}); });
jassProgramVisitor.getJassNativeManager().createNative("AbilityTypeAddOrderCommandCard", jassProgramVisitor.getJassNativeManager().createNative("AbilityTypeAddOrderButton", new JassFunction() {
new JassFunction() { @Override
@Override public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope,
public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope, final TriggerExecutionScope triggerScope) {
final TriggerExecutionScope triggerScope) { final CAbilityTypeJassDefinition abilityType = arguments.get(0)
final CAbilityTypeJassDefinition abilityType = arguments.get(0) .visit(ObjectJassValueVisitor.getInstance());
.visit(ObjectJassValueVisitor.getInstance()); final JassOrder commandCard = arguments.get(1).visit(ObjectJassValueVisitor.getInstance());
final JassOrder commandCard = arguments.get(1).visit(ObjectJassValueVisitor.getInstance()); abilityType.addJassOrder(commandCard);
abilityType.addJassOrder(commandCard); return null;
return null; }
} });
}); jassProgramVisitor.getJassNativeManager().createNative("AbilityTypeRemoveOrderButton", new JassFunction() {
jassProgramVisitor.getJassNativeManager().createNative("AbilityTypeRemoveOrderCommandCard", @Override
new JassFunction() { public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope,
@Override final TriggerExecutionScope triggerScope) {
public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope, final CAbilityTypeJassDefinition abilityType = arguments.get(0)
final TriggerExecutionScope triggerScope) { .visit(ObjectJassValueVisitor.getInstance());
final CAbilityTypeJassDefinition abilityType = arguments.get(0) final JassOrder commandCard = arguments.get(1).visit(ObjectJassValueVisitor.getInstance());
.visit(ObjectJassValueVisitor.getInstance()); abilityType.removeJassOrder(commandCard);
final JassOrder commandCard = arguments.get(1).visit(ObjectJassValueVisitor.getInstance()); return null;
abilityType.removeJassOrder(commandCard); }
return null; });
} jassProgramVisitor.getJassNativeManager().createNative("SetOrderButtonAutoCastOrderId", new JassFunction() {
}); @Override
jassProgramVisitor.getJassNativeManager().createNative("SetOrderCommandCardAutoCastOrderId", public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope,
new JassFunction() { final TriggerExecutionScope triggerScope) {
@Override final JassOrder orderCommandCard = arguments.get(0).visit(ObjectJassValueVisitor.getInstance());
public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope, final int autoCastOrderId = arguments.get(1).visit(IntegerJassValueVisitor.getInstance());
final TriggerExecutionScope triggerScope) { orderCommandCard.setAutoCastOrderId(autoCastOrderId);
final JassOrder orderCommandCard = arguments.get(0) return null;
.visit(ObjectJassValueVisitor.getInstance()); }
final int autoCastOrderId = arguments.get(1).visit(IntegerJassValueVisitor.getInstance()); });
orderCommandCard.setAutoCastOrderId(autoCastOrderId); jassProgramVisitor.getJassNativeManager().createNative("SetOrderButtonUnAutoCastOrderId",
return null;
}
});
jassProgramVisitor.getJassNativeManager().createNative("SetOrderCommandCardUnAutoCastOrderId",
new JassFunction() { new JassFunction() {
@Override @Override
public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope, public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope,
@ -4276,7 +4316,7 @@ public class Jass2 {
return null; return null;
} }
}); });
jassProgramVisitor.getJassNativeManager().createNative("SetOrderCommandCardContainerMenuOrderId", jassProgramVisitor.getJassNativeManager().createNative("SetOrderButtonContainerMenuOrderId",
new JassFunction() { new JassFunction() {
@Override @Override
public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope, public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope,
@ -4288,7 +4328,7 @@ public class Jass2 {
return null; return null;
} }
}); });
jassProgramVisitor.getJassNativeManager().createNative("SetOrderCommandCardDisabled", new JassFunction() { jassProgramVisitor.getJassNativeManager().createNative("SetOrderButtonDisabled", new JassFunction() {
@Override @Override
public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope, public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope,
final TriggerExecutionScope triggerScope) { final TriggerExecutionScope triggerScope) {
@ -4298,7 +4338,7 @@ public class Jass2 {
return null; return null;
} }
}); });
jassProgramVisitor.getJassNativeManager().createNative("SetOrderCommandCardManaCost", new JassFunction() { jassProgramVisitor.getJassNativeManager().createNative("SetOrderButtonManaCost", new JassFunction() {
@Override @Override
public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope, public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope,
final TriggerExecutionScope triggerScope) { final TriggerExecutionScope triggerScope) {
@ -4308,7 +4348,7 @@ public class Jass2 {
return null; return null;
} }
}); });
jassProgramVisitor.getJassNativeManager().createNative("SetOrderCommandCardGoldCost", new JassFunction() { jassProgramVisitor.getJassNativeManager().createNative("SetOrderButtonGoldCost", new JassFunction() {
@Override @Override
public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope, public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope,
final TriggerExecutionScope triggerScope) { final TriggerExecutionScope triggerScope) {
@ -4318,7 +4358,7 @@ public class Jass2 {
return null; return null;
} }
}); });
jassProgramVisitor.getJassNativeManager().createNative("SetOrderCommandCardLumberCost", new JassFunction() { jassProgramVisitor.getJassNativeManager().createNative("SetOrderButtonLumberCost", new JassFunction() {
@Override @Override
public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope, public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope,
final TriggerExecutionScope triggerScope) { final TriggerExecutionScope triggerScope) {
@ -4328,7 +4368,7 @@ public class Jass2 {
return null; return null;
} }
}); });
jassProgramVisitor.getJassNativeManager().createNative("SetOrderCommandCardFoodCostDisplayOnly", jassProgramVisitor.getJassNativeManager().createNative("SetOrderButtonFoodCostDisplayOnly",
new JassFunction() { new JassFunction() {
@Override @Override
public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope, public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope,
@ -4340,7 +4380,7 @@ public class Jass2 {
return null; return null;
} }
}); });
jassProgramVisitor.getJassNativeManager().createNative("SetOrderCommandCardCharges", new JassFunction() { jassProgramVisitor.getJassNativeManager().createNative("SetOrderButtonCharges", new JassFunction() {
@Override @Override
public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope, public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope,
final TriggerExecutionScope triggerScope) { final TriggerExecutionScope triggerScope) {
@ -4350,19 +4390,17 @@ public class Jass2 {
return null; return null;
} }
}); });
jassProgramVisitor.getJassNativeManager().createNative("SetOrderCommandCardAutoCastActive", jassProgramVisitor.getJassNativeManager().createNative("SetOrderButtonAutoCastActive", new JassFunction() {
new JassFunction() { @Override
@Override public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope,
public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope, final TriggerExecutionScope triggerScope) {
final TriggerExecutionScope triggerScope) { final JassOrder orderCommandCard = arguments.get(0).visit(ObjectJassValueVisitor.getInstance());
final JassOrder orderCommandCard = arguments.get(0) final boolean active = arguments.get(1).visit(BooleanJassValueVisitor.getInstance());
.visit(ObjectJassValueVisitor.getInstance()); orderCommandCard.setAutoCastActive(active);
final boolean active = arguments.get(1).visit(BooleanJassValueVisitor.getInstance()); return null;
orderCommandCard.setAutoCastActive(active); }
return null; });
} jassProgramVisitor.getJassNativeManager().createNative("SetOrderButtonHidden", new JassFunction() {
});
jassProgramVisitor.getJassNativeManager().createNative("SetOrderCommandCardHidden", new JassFunction() {
@Override @Override
public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope, public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope,
final TriggerExecutionScope triggerScope) { final TriggerExecutionScope triggerScope) {
@ -4372,7 +4410,7 @@ public class Jass2 {
return null; return null;
} }
}); });
jassProgramVisitor.getJassNativeManager().createNative("SetOrderCommandCardIconPath", new JassFunction() { jassProgramVisitor.getJassNativeManager().createNative("SetOrderButtonIconPath", new JassFunction() {
@Override @Override
public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope, public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope,
final TriggerExecutionScope triggerScope) { final TriggerExecutionScope triggerScope) {
@ -4382,31 +4420,27 @@ public class Jass2 {
return null; return null;
} }
}); });
jassProgramVisitor.getJassNativeManager().createNative("SetOrderCommandCardButtonPositionX", jassProgramVisitor.getJassNativeManager().createNative("SetOrderButtonButtonPositionX", new JassFunction() {
new JassFunction() { @Override
@Override public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope,
public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope, final TriggerExecutionScope triggerScope) {
final TriggerExecutionScope triggerScope) { final JassOrder orderCommandCard = arguments.get(0).visit(ObjectJassValueVisitor.getInstance());
final JassOrder orderCommandCard = arguments.get(0) final int buttonPosX = arguments.get(1).visit(IntegerJassValueVisitor.getInstance());
.visit(ObjectJassValueVisitor.getInstance()); orderCommandCard.setButtonPositionX(buttonPosX);
final int buttonPosX = arguments.get(1).visit(IntegerJassValueVisitor.getInstance()); return null;
orderCommandCard.setButtonPositionX(buttonPosX); }
return null; });
} jassProgramVisitor.getJassNativeManager().createNative("SetOrderButtonButtonPositionY", new JassFunction() {
}); @Override
jassProgramVisitor.getJassNativeManager().createNative("SetOrderCommandCardButtonPositionY", public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope,
new JassFunction() { final TriggerExecutionScope triggerScope) {
@Override final JassOrder orderCommandCard = arguments.get(0).visit(ObjectJassValueVisitor.getInstance());
public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope, final int buttonPosY = arguments.get(1).visit(IntegerJassValueVisitor.getInstance());
final TriggerExecutionScope triggerScope) { orderCommandCard.setButtonPositionY(buttonPosY);
final JassOrder orderCommandCard = arguments.get(0) return null;
.visit(ObjectJassValueVisitor.getInstance()); }
final int buttonPosY = arguments.get(1).visit(IntegerJassValueVisitor.getInstance()); });
orderCommandCard.setButtonPositionY(buttonPosY); jassProgramVisitor.getJassNativeManager().createNative("SetOrderButtonToolTip", new JassFunction() {
return null;
}
});
jassProgramVisitor.getJassNativeManager().createNative("SetOrderCommandCardToolTip", new JassFunction() {
@Override @Override
public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope, public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope,
final TriggerExecutionScope triggerScope) { final TriggerExecutionScope triggerScope) {
@ -4416,7 +4450,7 @@ public class Jass2 {
return null; return null;
} }
}); });
jassProgramVisitor.getJassNativeManager().createNative("SetOrderCommandCardUberTip", new JassFunction() { jassProgramVisitor.getJassNativeManager().createNative("SetOrderButtonUberTip", new JassFunction() {
@Override @Override
public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope, public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope,
final TriggerExecutionScope triggerScope) { final TriggerExecutionScope triggerScope) {
@ -4426,7 +4460,7 @@ public class Jass2 {
return null; return null;
} }
}); });
jassProgramVisitor.getJassNativeManager().createNative("SetOrderCommandCardHotKey", new JassFunction() { jassProgramVisitor.getJassNativeManager().createNative("SetOrderButtonHotKey", new JassFunction() {
@Override @Override
public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope, public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope,
final TriggerExecutionScope triggerScope) { final TriggerExecutionScope triggerScope) {
@ -4436,7 +4470,7 @@ public class Jass2 {
return null; return null;
} }
}); });
jassProgramVisitor.getJassNativeManager().createNative("SetOrderCommandCardPreviewBuildUnitId", jassProgramVisitor.getJassNativeManager().createNative("SetOrderButtonPreviewBuildUnitId",
new JassFunction() { new JassFunction() {
@Override @Override
public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope, public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope,
@ -4448,7 +4482,7 @@ public class Jass2 {
return null; return null;
} }
}); });
jassProgramVisitor.getJassNativeManager().createNative("SetOrderCommandCardAOE", new JassFunction() { jassProgramVisitor.getJassNativeManager().createNative("SetOrderButtonAOE", new JassFunction() {
@Override @Override
public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope, public JassValue call(final List<JassValue> arguments, final GlobalScope globalScope,
final TriggerExecutionScope triggerScope) { final TriggerExecutionScope triggerScope) {
@ -4603,6 +4637,7 @@ public class Jass2 {
final HandleJassType ordercommandcardtypeType = globals.registerHandleType("ordercommandcardtype"); final HandleJassType ordercommandcardtypeType = globals.registerHandleType("ordercommandcardtype");
final HandleJassType abilitybehaviorType = globals.registerHandleType("abilitybehavior"); final HandleJassType abilitybehaviorType = globals.registerHandleType("abilitybehavior");
final HandleJassType behaviorexprType = globals.registerHandleType("behaviorexpr"); final HandleJassType behaviorexprType = globals.registerHandleType("behaviorexpr");
final HandleJassType iconuiType = globals.registerHandleType("iconui");
registerTypingNatives(jassProgramVisitor, raceType, alliancetypeType, racepreferenceType, igamestateType, registerTypingNatives(jassProgramVisitor, raceType, alliancetypeType, racepreferenceType, igamestateType,
fgamestateType, playerstateType, playerscoreType, playergameresultType, unitstateType, fgamestateType, playerstateType, playerscoreType, playergameresultType, unitstateType,

View File

@ -10,7 +10,7 @@ import com.etheller.warsmash.viewer5.handlers.w3x.simulation.CWidget;
import com.etheller.warsmash.viewer5.handlers.w3x.simulation.abilities.CAbility; import com.etheller.warsmash.viewer5.handlers.w3x.simulation.abilities.CAbility;
import com.etheller.warsmash.viewer5.handlers.w3x.simulation.abilities.targeting.AbilityPointTarget; import com.etheller.warsmash.viewer5.handlers.w3x.simulation.abilities.targeting.AbilityPointTarget;
import com.etheller.warsmash.viewer5.handlers.w3x.simulation.abilities.types.jass.CAbilityTypeJassDefinition.JassOrder; import com.etheller.warsmash.viewer5.handlers.w3x.simulation.abilities.types.jass.CAbilityTypeJassDefinition.JassOrder;
import com.etheller.warsmash.viewer5.handlers.w3x.simulation.abilities.types.jass.CAbilityTypeJassDefinition.JassOrderCommandCardType; import com.etheller.warsmash.viewer5.handlers.w3x.simulation.abilities.types.jass.CAbilityTypeJassDefinition.JassOrderButtonType;
import com.etheller.warsmash.viewer5.handlers.w3x.simulation.players.CPlayerJass; import com.etheller.warsmash.viewer5.handlers.w3x.simulation.players.CPlayerJass;
import com.etheller.warsmash.viewer5.handlers.w3x.simulation.region.CRegion; import com.etheller.warsmash.viewer5.handlers.w3x.simulation.region.CRegion;
import com.etheller.warsmash.viewer5.handlers.w3x.simulation.timers.CTimerJass; import com.etheller.warsmash.viewer5.handlers.w3x.simulation.timers.CTimerJass;
@ -83,7 +83,7 @@ public class CommonTriggerExecutionScope extends TriggerExecutionScope {
private AbilityPointTarget spellTargetPoint; private AbilityPointTarget spellTargetPoint;
private War3ID spellAbilityId; private War3ID spellAbilityId;
private int spellAbilityOrderId; // Warsmash only private int spellAbilityOrderId; // Warsmash only
private JassOrderCommandCardType spellAbilityTargetType; // Warsmash only private JassOrderButtonType spellAbilityTargetType; // Warsmash only
private JassOrder spellAbilityOrderCommandCard; // Warsmash only private JassOrder spellAbilityOrderCommandCard; // Warsmash only
private JassGameEventsWar3 triggerEventId; private JassGameEventsWar3 triggerEventId;
@ -411,7 +411,7 @@ public class CommonTriggerExecutionScope extends TriggerExecutionScope {
return this.spellAbilityOrderId; return this.spellAbilityOrderId;
} }
public JassOrderCommandCardType getSpellAbilityTargetType() { public JassOrderButtonType getSpellAbilityTargetType() {
return this.spellAbilityTargetType; return this.spellAbilityTargetType;
} }
@ -583,7 +583,7 @@ public class CommonTriggerExecutionScope extends TriggerExecutionScope {
public static CommonTriggerExecutionScope jassAbilityTargetScope(final CAbility spellAbility, public static CommonTriggerExecutionScope jassAbilityTargetScope(final CAbility spellAbility,
final CUnit spellAbilityUnit, final CUnit targetUnit, final War3ID spellAbilityId, final CUnit spellAbilityUnit, final CUnit targetUnit, final War3ID spellAbilityId,
final int spellAbilityOrderId, final JassOrderCommandCardType spellAbilityTargetType, final int spellAbilityOrderId, final JassOrderButtonType spellAbilityTargetType,
final JassOrder spellAbilityOrderCommandCard) { final JassOrder spellAbilityOrderCommandCard) {
final CommonTriggerExecutionScope scope = new CommonTriggerExecutionScope(null, TriggerExecutionScope.EMPTY); final CommonTriggerExecutionScope scope = new CommonTriggerExecutionScope(null, TriggerExecutionScope.EMPTY);
scope.spellAbility = spellAbility; scope.spellAbility = spellAbility;
@ -598,7 +598,7 @@ public class CommonTriggerExecutionScope extends TriggerExecutionScope {
public static CommonTriggerExecutionScope jassAbilityTargetScope(final CAbility spellAbility, public static CommonTriggerExecutionScope jassAbilityTargetScope(final CAbility spellAbility,
final CUnit spellAbilityUnit, final CItem targetItem, final War3ID spellAbilityId, final CUnit spellAbilityUnit, final CItem targetItem, final War3ID spellAbilityId,
final int spellAbilityOrderId, final JassOrderCommandCardType spellAbilityTargetType, final int spellAbilityOrderId, final JassOrderButtonType spellAbilityTargetType,
final JassOrder spellAbilityOrderCommandCard) { final JassOrder spellAbilityOrderCommandCard) {
final CommonTriggerExecutionScope scope = new CommonTriggerExecutionScope(null, TriggerExecutionScope.EMPTY); final CommonTriggerExecutionScope scope = new CommonTriggerExecutionScope(null, TriggerExecutionScope.EMPTY);
scope.spellAbility = spellAbility; scope.spellAbility = spellAbility;
@ -613,7 +613,7 @@ public class CommonTriggerExecutionScope extends TriggerExecutionScope {
public static CommonTriggerExecutionScope jassAbilityTargetScope(final CAbility spellAbility, public static CommonTriggerExecutionScope jassAbilityTargetScope(final CAbility spellAbility,
final CUnit spellAbilityUnit, final CDestructable targetDestructable, final War3ID spellAbilityId, final CUnit spellAbilityUnit, final CDestructable targetDestructable, final War3ID spellAbilityId,
final int spellAbilityOrderId, final JassOrderCommandCardType spellAbilityTargetType, final int spellAbilityOrderId, final JassOrderButtonType spellAbilityTargetType,
final JassOrder spellAbilityOrderCommandCard) { final JassOrder spellAbilityOrderCommandCard) {
final CommonTriggerExecutionScope scope = new CommonTriggerExecutionScope(null, TriggerExecutionScope.EMPTY); final CommonTriggerExecutionScope scope = new CommonTriggerExecutionScope(null, TriggerExecutionScope.EMPTY);
scope.spellAbility = spellAbility; scope.spellAbility = spellAbility;
@ -628,7 +628,7 @@ public class CommonTriggerExecutionScope extends TriggerExecutionScope {
public static CommonTriggerExecutionScope jassAbilityPointScope(final CAbility spellAbility, public static CommonTriggerExecutionScope jassAbilityPointScope(final CAbility spellAbility,
final CUnit spellAbilityUnit, final AbilityPointTarget targetPoint, final War3ID spellAbilityId, final CUnit spellAbilityUnit, final AbilityPointTarget targetPoint, final War3ID spellAbilityId,
final int spellAbilityOrderId, final JassOrderCommandCardType spellAbilityTargetType, final int spellAbilityOrderId, final JassOrderButtonType spellAbilityTargetType,
final JassOrder spellAbilityOrderCommandCard) { final JassOrder spellAbilityOrderCommandCard) {
final CommonTriggerExecutionScope scope = new CommonTriggerExecutionScope(null, TriggerExecutionScope.EMPTY); final CommonTriggerExecutionScope scope = new CommonTriggerExecutionScope(null, TriggerExecutionScope.EMPTY);
scope.spellAbility = spellAbility; scope.spellAbility = spellAbility;
@ -643,7 +643,7 @@ public class CommonTriggerExecutionScope extends TriggerExecutionScope {
public static CommonTriggerExecutionScope jassAbilityNoTargetScope(final CAbility spellAbility, public static CommonTriggerExecutionScope jassAbilityNoTargetScope(final CAbility spellAbility,
final CUnit spellAbilityUnit, final War3ID spellAbilityId, final int spellAbilityOrderId, final CUnit spellAbilityUnit, final War3ID spellAbilityId, final int spellAbilityOrderId,
final JassOrderCommandCardType spellAbilityTargetType, final JassOrder spellAbilityOrderCommandCard) { final JassOrderButtonType spellAbilityTargetType, final JassOrder spellAbilityOrderCommandCard) {
final CommonTriggerExecutionScope scope = new CommonTriggerExecutionScope(null, TriggerExecutionScope.EMPTY); final CommonTriggerExecutionScope scope = new CommonTriggerExecutionScope(null, TriggerExecutionScope.EMPTY);
scope.spellAbility = spellAbility; scope.spellAbility = spellAbility;
scope.spellAbilityUnit = spellAbilityUnit; scope.spellAbilityUnit = spellAbilityUnit;
@ -678,7 +678,7 @@ public class CommonTriggerExecutionScope extends TriggerExecutionScope {
public static CommonTriggerExecutionScope jassAbilityBasicScope(final CAbility spellAbility, public static CommonTriggerExecutionScope jassAbilityBasicScope(final CAbility spellAbility,
final CUnit spellAbilityUnit, final War3ID spellAbilityId, final int spellAbilityOrderId, final CUnit spellAbilityUnit, final War3ID spellAbilityId, final int spellAbilityOrderId,
final JassOrderCommandCardType spellAbilityTargetType, final JassOrder spellAbilityOrderCommandCard) { final JassOrderButtonType spellAbilityTargetType, final JassOrder spellAbilityOrderCommandCard) {
final CommonTriggerExecutionScope scope = new CommonTriggerExecutionScope(null, TriggerExecutionScope.EMPTY); final CommonTriggerExecutionScope scope = new CommonTriggerExecutionScope(null, TriggerExecutionScope.EMPTY);
scope.spellAbility = spellAbility; scope.spellAbility = spellAbility;
scope.spellAbilityUnit = spellAbilityUnit; scope.spellAbilityUnit = spellAbilityUnit;

View File

@ -33,7 +33,7 @@ import com.etheller.warsmash.viewer5.handlers.w3x.simulation.abilities.queue.CAb
import com.etheller.warsmash.viewer5.handlers.w3x.simulation.abilities.queue.CAbilityRally; import com.etheller.warsmash.viewer5.handlers.w3x.simulation.abilities.queue.CAbilityRally;
import com.etheller.warsmash.viewer5.handlers.w3x.simulation.abilities.queue.CAbilityReviveHero; import com.etheller.warsmash.viewer5.handlers.w3x.simulation.abilities.queue.CAbilityReviveHero;
import com.etheller.warsmash.viewer5.handlers.w3x.simulation.abilities.types.jass.CAbilityTypeJassDefinition.JassOrder; import com.etheller.warsmash.viewer5.handlers.w3x.simulation.abilities.types.jass.CAbilityTypeJassDefinition.JassOrder;
import com.etheller.warsmash.viewer5.handlers.w3x.simulation.abilities.types.jass.CAbilityTypeJassDefinition.JassOrderCommandCardType; import com.etheller.warsmash.viewer5.handlers.w3x.simulation.abilities.types.jass.CAbilityTypeJassDefinition.JassOrderButtonType;
import com.etheller.warsmash.viewer5.handlers.w3x.simulation.abilities.upgrade.CAbilityUpgrade; import com.etheller.warsmash.viewer5.handlers.w3x.simulation.abilities.upgrade.CAbilityUpgrade;
import com.etheller.warsmash.viewer5.handlers.w3x.simulation.combat.attacks.CUnitAttack; import com.etheller.warsmash.viewer5.handlers.w3x.simulation.combat.attacks.CUnitAttack;
import com.etheller.warsmash.viewer5.handlers.w3x.simulation.orders.OrderIds; import com.etheller.warsmash.viewer5.handlers.w3x.simulation.orders.OrderIds;
@ -187,7 +187,7 @@ public class CommandCardPopulatingAbilityVisitor implements CAbilityVisitor<Void
order.getTip(), order.getUberTip(), order.getButtonPositionX(), order.getButtonPositionY(), order.getTip(), order.getUberTip(), order.getButtonPositionX(), order.getButtonPositionY(),
ability.getHandleId(), order.getOrderId(), ability.getHandleId(), order.getOrderId(),
order.isAutoCastActive() ? order.getAutoCastOrderId() : order.getAutoCastUnOrderId(), order.isAutoCastActive() ? order.getAutoCastOrderId() : order.getAutoCastUnOrderId(),
order.isAutoCastActive(), order.getType() == JassOrderCommandCardType.MENU, order.isAutoCastActive(), order.getType() == JassOrderButtonType.MENU,
order.getGoldCost(), order.getLumberCost(), order.getFoodCostDisplayOnly(), order.getGoldCost(), order.getLumberCost(), order.getFoodCostDisplayOnly(),
order.getManaCost(), order.getCharges(), order.getHotkey()); order.getManaCost(), order.getCharges(), order.getHotkey());
} }

View File

@ -201,7 +201,7 @@ public class CAbilityTypeJassDefinition extends AbstractCAbilityTypeDefinition<C
public CBehavior begin(final CSimulation game, final CAbilityJass abilityJass, final CUnit caster, public CBehavior begin(final CSimulation game, final CAbilityJass abilityJass, final CUnit caster,
final int orderId, final CWidget target) { final int orderId, final CWidget target) {
final JassOrder orderCommandCardIcon = getOrderCommandCardIcon(game, caster, orderId); final JassOrder orderCommandCardIcon = getOrderCommandCardIcon(game, caster, orderId);
if (orderCommandCardIcon.type == JassOrderCommandCardType.INSTANT_NO_TARGET) { if (orderCommandCardIcon.type == JassOrderButtonType.INSTANT_NO_TARGET) {
if (this.beginJass != null) { if (this.beginJass != null) {
CommonTriggerExecutionScope scope; CommonTriggerExecutionScope scope;
scope = target.visit(new CWidgetVisitor<CommonTriggerExecutionScope>() { scope = target.visit(new CWidgetVisitor<CommonTriggerExecutionScope>() {
@ -237,7 +237,7 @@ public class CAbilityTypeJassDefinition extends AbstractCAbilityTypeDefinition<C
public CBehavior begin(final CSimulation game, final CAbilityJass abilityJass, final CUnit caster, public CBehavior begin(final CSimulation game, final CAbilityJass abilityJass, final CUnit caster,
final int orderId, final AbilityPointTarget point) { final int orderId, final AbilityPointTarget point) {
final JassOrder orderCommandCardIcon = getOrderCommandCardIcon(game, caster, orderId); final JassOrder orderCommandCardIcon = getOrderCommandCardIcon(game, caster, orderId);
if (orderCommandCardIcon.type == JassOrderCommandCardType.INSTANT_NO_TARGET) { if (orderCommandCardIcon.type == JassOrderButtonType.INSTANT_NO_TARGET) {
if (this.beginJass != null) { if (this.beginJass != null) {
return this.beginJass.evaluate(this.jassGlobalScope, return this.beginJass.evaluate(this.jassGlobalScope,
CommonTriggerExecutionScope.jassAbilityPointScope(abilityJass, caster, point, CommonTriggerExecutionScope.jassAbilityPointScope(abilityJass, caster, point,
@ -255,7 +255,7 @@ public class CAbilityTypeJassDefinition extends AbstractCAbilityTypeDefinition<C
public CBehavior beginNoTarget(final CSimulation game, final CAbilityJass abilityJass, final CUnit caster, public CBehavior beginNoTarget(final CSimulation game, final CAbilityJass abilityJass, final CUnit caster,
final int orderId) { final int orderId) {
final JassOrder orderCommandCardIcon = getOrderCommandCardIcon(game, caster, orderId); final JassOrder orderCommandCardIcon = getOrderCommandCardIcon(game, caster, orderId);
if (orderCommandCardIcon.type == JassOrderCommandCardType.INSTANT_NO_TARGET) { if (orderCommandCardIcon.type == JassOrderButtonType.INSTANT_NO_TARGET) {
if (this.beginJass != null) { if (this.beginJass != null) {
return this.beginJass.evaluate(this.jassGlobalScope, return this.beginJass.evaluate(this.jassGlobalScope,
CommonTriggerExecutionScope.jassAbilityNoTargetScope(abilityJass, caster, CommonTriggerExecutionScope.jassAbilityNoTargetScope(abilityJass, caster,
@ -285,7 +285,7 @@ public class CAbilityTypeJassDefinition extends AbstractCAbilityTypeDefinition<C
} }
} }
final JassOrder orderCommandCardIcon = getOrderCommandCardIcon(game, caster, orderId); final JassOrder orderCommandCardIcon = getOrderCommandCardIcon(game, caster, orderId);
if (orderCommandCardIcon.type == JassOrderCommandCardType.INSTANT_NO_TARGET_NO_INTERRUPT) { if (orderCommandCardIcon.type == JassOrderButtonType.INSTANT_NO_TARGET_NO_INTERRUPT) {
if (this.checkBeforeQueueJass != null) { if (this.checkBeforeQueueJass != null) {
return this.checkBeforeQueueJass.evaluate(this.jassGlobalScope, return this.checkBeforeQueueJass.evaluate(this.jassGlobalScope,
CommonTriggerExecutionScope.jassAbilityNoTargetScope(abilityJass, caster, CommonTriggerExecutionScope.jassAbilityNoTargetScope(abilityJass, caster,
@ -303,8 +303,8 @@ public class CAbilityTypeJassDefinition extends AbstractCAbilityTypeDefinition<C
public void checkCanTarget(final CSimulation game, final CAbilityJass abilityJass, final CUnit unit, public void checkCanTarget(final CSimulation game, final CAbilityJass abilityJass, final CUnit unit,
final int orderId, final CWidget target, final AbilityTargetCheckReceiver<CWidget> receiver) { final int orderId, final CWidget target, final AbilityTargetCheckReceiver<CWidget> receiver) {
final JassOrder orderCommandCardIcon = getOrderCommandCardIcon(game, unit, orderId); final JassOrder orderCommandCardIcon = getOrderCommandCardIcon(game, unit, orderId);
if ((orderCommandCardIcon != null) && ((orderCommandCardIcon.type == JassOrderCommandCardType.UNIT_TARGET) if ((orderCommandCardIcon != null) && ((orderCommandCardIcon.type == JassOrderButtonType.UNIT_TARGET)
|| (orderCommandCardIcon.type == JassOrderCommandCardType.UNIT_OR_POINT_TARGET))) { || (orderCommandCardIcon.type == JassOrderButtonType.UNIT_OR_POINT_TARGET))) {
if (this.checkTargetJass != null) { if (this.checkTargetJass != null) {
CommonTriggerExecutionScope scope; CommonTriggerExecutionScope scope;
scope = target.visit(new CWidgetVisitor<CommonTriggerExecutionScope>() { scope = target.visit(new CWidgetVisitor<CommonTriggerExecutionScope>() {
@ -346,8 +346,8 @@ public class CAbilityTypeJassDefinition extends AbstractCAbilityTypeDefinition<C
final int orderId, final AbilityPointTarget target, final int orderId, final AbilityPointTarget target,
final AbilityTargetCheckReceiver<AbilityPointTarget> receiver) { final AbilityTargetCheckReceiver<AbilityPointTarget> receiver) {
final JassOrder orderCommandCardIcon = getOrderCommandCardIcon(game, unit, orderId); final JassOrder orderCommandCardIcon = getOrderCommandCardIcon(game, unit, orderId);
if ((orderCommandCardIcon != null) && ((orderCommandCardIcon.type == JassOrderCommandCardType.POINT_TARGET) if ((orderCommandCardIcon != null) && ((orderCommandCardIcon.type == JassOrderButtonType.POINT_TARGET)
|| (orderCommandCardIcon.type == JassOrderCommandCardType.UNIT_OR_POINT_TARGET))) { || (orderCommandCardIcon.type == JassOrderButtonType.UNIT_OR_POINT_TARGET))) {
if (this.checkTargetJass != null) { if (this.checkTargetJass != null) {
if (this.checkTargetJass.evaluate(this.jassGlobalScope, if (this.checkTargetJass.evaluate(this.jassGlobalScope,
CommonTriggerExecutionScope.jassAbilityPointScope(abilityJass, unit, target, CommonTriggerExecutionScope.jassAbilityPointScope(abilityJass, unit, target,
@ -371,7 +371,7 @@ public class CAbilityTypeJassDefinition extends AbstractCAbilityTypeDefinition<C
final int orderId, final AbilityTargetCheckReceiver<Void> receiver) { final int orderId, final AbilityTargetCheckReceiver<Void> receiver) {
final JassOrder orderCommandCardIcon = getOrderCommandCardIcon(game, unit, orderId); final JassOrder orderCommandCardIcon = getOrderCommandCardIcon(game, unit, orderId);
if ((orderCommandCardIcon != null) if ((orderCommandCardIcon != null)
&& (orderCommandCardIcon.type == JassOrderCommandCardType.INSTANT_NO_TARGET)) { && (orderCommandCardIcon.type == JassOrderButtonType.INSTANT_NO_TARGET)) {
if (this.checkTargetJass != null) { if (this.checkTargetJass != null) {
if (this.checkTargetJass.evaluate(this.jassGlobalScope, if (this.checkTargetJass.evaluate(this.jassGlobalScope,
CommonTriggerExecutionScope.jassAbilityNoTargetScope(abilityJass, unit, abilityJass.getAlias(), CommonTriggerExecutionScope.jassAbilityNoTargetScope(abilityJass, unit, abilityJass.getAlias(),
@ -397,7 +397,7 @@ public class CAbilityTypeJassDefinition extends AbstractCAbilityTypeDefinition<C
if ((orderCommandCardIcon == null) || orderCommandCardIcon.disabled) { if ((orderCommandCardIcon == null) || orderCommandCardIcon.disabled) {
receiver.disabled(); receiver.disabled();
} }
else if (orderCommandCardIcon.type == JassOrderCommandCardType.PASSIVE) { else if (orderCommandCardIcon.type == JassOrderButtonType.PASSIVE) {
receiver.notAnActiveAbility(); receiver.notAnActiveAbility();
} }
else if (orderCommandCardIcon.charges == 0) { else if (orderCommandCardIcon.charges == 0) {
@ -453,7 +453,7 @@ public class CAbilityTypeJassDefinition extends AbstractCAbilityTypeDefinition<C
if (orderCommandCardIcon.disabled) { if (orderCommandCardIcon.disabled) {
continue; continue;
} }
if (orderCommandCardIcon.type == JassOrderCommandCardType.PASSIVE) { if (orderCommandCardIcon.type == JassOrderButtonType.PASSIVE) {
continue; continue;
} }
if (orderCommandCardIcon.charges == 0) { if (orderCommandCardIcon.charges == 0) {
@ -491,7 +491,7 @@ public class CAbilityTypeJassDefinition extends AbstractCAbilityTypeDefinition<C
private int lumberCost; private int lumberCost;
private int charges = INFINITE_CHARGES; private int charges = INFINITE_CHARGES;
private int foodCostDisplayOnly; private int foodCostDisplayOnly;
private JassOrderCommandCardType type; private JassOrderButtonType type;
private boolean autoCastActive; private boolean autoCastActive;
// UI // UI
@ -594,11 +594,11 @@ public class CAbilityTypeJassDefinition extends AbstractCAbilityTypeDefinition<C
this.foodCostDisplayOnly = foodCostDisplayOnly; this.foodCostDisplayOnly = foodCostDisplayOnly;
} }
public JassOrderCommandCardType getType() { public JassOrderButtonType getType() {
return this.type; return this.type;
} }
public void setType(final JassOrderCommandCardType type) { public void setType(final JassOrderButtonType type) {
this.type = type; this.type = type;
} }
@ -699,10 +699,10 @@ public class CAbilityTypeJassDefinition extends AbstractCAbilityTypeDefinition<C
} }
} }
public static enum JassOrderCommandCardType { public static enum JassOrderButtonType {
INSTANT_NO_TARGET, UNIT_TARGET, POINT_TARGET, UNIT_OR_POINT_TARGET, INSTANT_NO_TARGET_NO_INTERRUPT, PASSIVE, INSTANT_NO_TARGET, UNIT_TARGET, POINT_TARGET, UNIT_OR_POINT_TARGET, INSTANT_NO_TARGET_NO_INTERRUPT, PASSIVE,
MENU; MENU;
public static JassOrderCommandCardType[] VALUES = values(); public static JassOrderButtonType[] VALUES = values();
} }
} }