Example #1
0
 public void DeserializeAsset(AssetFile assetFile, StreamReader stream)
 {
     m_effectName                  = stream.ReadString32();
     m_duration                    = stream.ReadInt32();
     m_maxStackSize                = stream.ReadInt32();
     m_damagePerTurn               = stream.ReadInt32();
     m_healingPerTurn              = stream.ReadInt32();
     m_healingType                 = (HealingType)stream.ReadInt32();
     m_perTurnHitDelayTurns        = stream.ReadInt32();
     m_absorbAmount                = stream.ReadInt32();
     m_nextTurnAbsorbAmount        = stream.ReadInt32();
     m_dontEndEarlyOnShieldDeplete = stream.ReadBoolean();
     stream.AlignTo();
     m_damagePerMoveSquare                  = stream.ReadInt32();
     m_healPerMoveSquare                    = stream.ReadInt32();
     m_techPointLossPerMoveSquare           = stream.ReadInt32();
     m_techPointGainPerMoveSquare           = stream.ReadInt32();
     m_techPointChangeOnStart               = stream.ReadInt32();
     m_techPointGainPerTurn                 = stream.ReadInt32();
     m_techPointLossPerTurn                 = stream.ReadInt32();
     m_invisBreakMode                       = (InvisibilityBreakMode)stream.ReadInt32();
     m_removeInvisibilityOnLastResolveStart = stream.ReadBoolean();
     stream.AlignTo();
     m_removeRevealedOnLastResolveStart = stream.ReadBoolean();
     stream.AlignTo();
     m_statMods           = new SerializedArray <AbilityStatMod>(assetFile, stream);
     m_statusChanges      = new SerializedArray <StatusType>(assetFile, stream);
     m_statusDelayMode    = (StatusDelayMode)stream.ReadInt32();
     m_endTriggers        = new SerializedArray <EffectEndTag>(assetFile, stream);
     m_sequencePrefabs    = new SerializedVector <SerializedComponent>(assetFile, stream);
     m_tickSequencePrefab = new SerializedComponent(assetFile, stream);
 }
Example #2
0
 public void UseHealingItem(HealingType type)
 {
     if (type == HealingType.Primary &&
         EquippedPrimaryHealing != null)
     {
         GainHealth(EquippedPrimaryHealing.HealingPercentage);
         EquippedPrimaryHealing = null;
     }
     else if (EquippedSecondaryHealing != null)
     {
         GainHealth(EquippedSecondaryHealing.HealingPercentage);
         EquippedSecondaryHealing = null;
     }
 }
Example #3
0
 private void ToggleHealingItem(string name, HealingType type)
 {
     if (type == HealingType.Primary)
     {
         if (playerOne.EquippedPrimaryHealing == null)
         {
             playerOne.EquipHealingItem(name);
         }
         else
         {
             playerOne.UseHealingItem(type);
         }
     }
 }
        private void SetupHealingOverHealing(Line line, HealingType healingType)
        {
            var cleanedAction = Regex.Replace(line.Action, @" \[.+\]", string.Empty);

            switch (healingType)
            {
            case HealingType.Normal:
                line.Action = $"{cleanedAction} [∞]";
                this.SetHealingOverHealing(line);
                break;

            case HealingType.HealingOverTime:
                line.Action = $"{cleanedAction} [•][∞]";
                this.SetHealingOverHealing(line);
                break;
            }
        }
        private void SetupHealingOverHealing(Line line, HealingType healingType)
        {
            var cleanedAction = Regex.Replace(line.Action, @" \[.+\]", "");

            switch (healingType)
            {
            case HealingType.Normal:
                line.Action = String.Format("{0} [∞]", cleanedAction);
                SetHealingOverHealing(line);
                break;

            case HealingType.HealingOverTime:
                line.Action = String.Format("{0} [•][∞]", cleanedAction);
                SetHealingOverHealing(line);
                break;
            }
        }
 private void SetupHealingOverHealing(Line line, HealingType healingType)
 {
     var cleanedAction = Regex.Replace(line.Action, @" \[.+\]", "");
     switch (healingType)
     {
         case HealingType.Normal:
             line.Action = String.Format("{0} [∞]", cleanedAction);
             SetHealingOverHealing(line);
             break;
         case HealingType.HealingOverTime:
             line.Action = String.Format("{0} [•][∞]", cleanedAction);
             SetHealingOverHealing(line);
             break;
     }
 }