mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2026-05-17 03:44:05 +08:00
Implement a proper ability system (#2166)
* Apply fix `21dec2fe` * Apply fix `89d01d5f` * Apply fix `d900f154` this one was already implemented; updated to use call from previous commit * Ability changing commit TODO: change info to debug * Remove use of deprecated methods/fields * Temp commit v2 (Adding LoseHP and some fixes) * Oopsie * Probably fix monster battle * Fix issue with reflecting into fields * Fix some things * Fix ability names for 3.6 resources * Improve logging --------- Co-authored-by: StartForKiller <jesussanz2003@gmail.com>
This commit is contained in:
@@ -35,8 +35,11 @@ public class AbilityModifier implements Serializable {
|
||||
public AbilityModifierAction[] onHeal;
|
||||
public AbilityModifierAction[] onBeingHealed;
|
||||
public DynamicFloat duration = DynamicFloat.ZERO;
|
||||
public DynamicFloat thinkInterval = DynamicFloat.ZERO;
|
||||
public String stacking;
|
||||
|
||||
public AbilityMixinData[] modifierMixins;
|
||||
|
||||
public ElementType elementType;
|
||||
public DynamicFloat elementDurability = DynamicFloat.ZERO;
|
||||
|
||||
@@ -264,21 +267,52 @@ public class AbilityModifier implements Serializable {
|
||||
|
||||
public String target;
|
||||
|
||||
@SerializedName(value = "amount", alternate = "PDLLIFICICJ")
|
||||
@SerializedName(value = "amount", alternate = {"PDLLIFICICJ", "cdRatio"})
|
||||
public DynamicFloat amount = DynamicFloat.ZERO;
|
||||
|
||||
@SerializedName(value = "amountByTargetCurrentHPRatio")
|
||||
public DynamicFloat amountByCasterAttackRatio = DynamicFloat.ZERO;
|
||||
|
||||
@SerializedName(value = "unused")
|
||||
public DynamicFloat amountByCasterCurrentHPRatio = DynamicFloat.ZERO;
|
||||
|
||||
@SerializedName(value = "unknown", alternate = {"HFNJHOGGFKB", "GEJGGCIOLKN"})
|
||||
public DynamicFloat amountByCasterMaxHPRatio = DynamicFloat.ZERO;
|
||||
|
||||
public DynamicFloat amountByGetDamage = DynamicFloat.ZERO;
|
||||
|
||||
@SerializedName(value = "amountByTargetMaxHPRatio")
|
||||
public DynamicFloat amountByTargetCurrentHPRatio = DynamicFloat.ZERO;
|
||||
|
||||
@SerializedName(value = "amountByCasterMaxHPRatio")
|
||||
public DynamicFloat amountByTargetMaxHPRatio = DynamicFloat.ZERO;
|
||||
|
||||
public DynamicFloat limboByTargetMaxHPRatio = DynamicFloat.ZERO;
|
||||
|
||||
public DynamicFloat healRatio = DynamicFloat.ONE;
|
||||
|
||||
@SerializedName(value = "ignoreAbilityProperty", alternate = "HHFGADCJJDI")
|
||||
public boolean ignoreAbilityProperty;
|
||||
|
||||
public String modifierName;
|
||||
|
||||
public boolean enableLockHP;
|
||||
public boolean disableWhenLoading;
|
||||
public boolean lethal = true;
|
||||
|
||||
public boolean muteHealEffect = false;
|
||||
|
||||
public boolean byServer;
|
||||
public boolean lifeByOwnerIsAlive;
|
||||
public String campTargetType;
|
||||
public int campID;
|
||||
public int gadgetID;
|
||||
public boolean ownerIsTarget;
|
||||
|
||||
public boolean isFromOwner;
|
||||
public String globalValueKey;
|
||||
public String abilityFormula;
|
||||
|
||||
public int param1;
|
||||
public int param2;
|
||||
public int param3;
|
||||
|
||||
Reference in New Issue
Block a user