public void Hit(bool use_effect_action, MoveEditor.PlayHitReactionProperties.eReactionType default_action) { // ensure effect action will play if (!use_effect_action && IsLast() && !EffectPlayed) { use_effect_action = true; } // translate combo state to current_reaction, only enable combo once PlayEffect = !EffectPlayed && use_effect_action; // calculate action if (!use_effect_action) { Reaction = default_action; } }
protected bool ActionExists(MoveEditor.PlayHitReactionProperties.eReactionType reaction) { MoveController mc = Combatant.MoveController; switch (reaction) { case MoveEditor.PlayHitReactionProperties.eReactionType.Back: return(mc.GetMoveIfExists(BackActionState.backMoveName) != null); case MoveEditor.PlayHitReactionProperties.eReactionType.Down: return(mc.GetMoveIfExists(DownActionState.downMoveName) != null); case MoveEditor.PlayHitReactionProperties.eReactionType.LittleFlow: case MoveEditor.PlayHitReactionProperties.eReactionType.LargeFlow: return(mc.GetMoveIfExists(FlowActionState.flowMoveName) != null); case MoveEditor.PlayHitReactionProperties.eReactionType.Block: return(mc.GetMoveIfExists(BlockActionState.blockMoveName) != null); } return(true); }
public override bool Parse(Hashtable info) { if (!base.Parse(info)) { return(false); } m_total_damage = EB.Dot.Integer("damage", info, 0); m_damage = m_total_damage; m_total_show = EB.Dot.Integer("show", info, -1); if (m_total_show < 0) { m_total_show = m_total_damage; } m_show = m_total_show; m_shield = EB.Dot.Integer("shield", info, 0); string action = EB.Dot.String("action", info, ""); if (m_damage == 0 && action.CompareTo("block") == 0) { m_miss = true; } if (m_damage == 0 && m_shield > 0) { m_absorb = true; } m_critical = EB.Dot.Bool("critical", info, false); if (action == "beat_back") { m_reaction_type = MoveEditor.PlayHitReactionProperties.eReactionType.Back; } else if (action == "beat_down") { m_reaction_type = MoveEditor.PlayHitReactionProperties.eReactionType.Down; } else if (action == "little_flow") { m_reaction_type = MoveEditor.PlayHitReactionProperties.eReactionType.LittleFlow; } else if (action == "large_flow") { m_reaction_type = MoveEditor.PlayHitReactionProperties.eReactionType.LargeFlow; } else if (action == "block") { m_reaction_type = MoveEditor.PlayHitReactionProperties.eReactionType.Block; } else if (action == "hit") { m_reaction_type = MoveEditor.PlayHitReactionProperties.eReactionType.Hit; } else { EB.Debug.LogWarning("ReactionEffectEvent.Parse: invalid action = {0}", action); m_reaction_type = MoveEditor.PlayHitReactionProperties.eReactionType.Hit; } m_immune_reaction_effect = EB.Dot.Bool("immuneReactionEffect", info, false); return(true); }