// actor enter into floor public void ActorEnterFloorAction(Actor a) { if( m_fgData.fixedDamage > 0 ) { int damage = Mathf.Clamp ( (int)m_fgData.fixedDamage, 0, (int)a.hp - 1 ); if( damage > 0 ) { GUIManager.GetManager().Message(a.charName + " は " + damage + " の ダメージをうけた!" ); a.ApplyDamage(damage); } } //TODO if( m_fgData.graphic == "PoisonFloor" ) { a.SpawnEffect("PoisonWell"); a.AttachStatus(StatusModifier.Kind.Poison); } if( m_fgData.graphic == "ParalizeFloor" ) { a.SpawnEffect("Paralize"); a.AttachStatus(StatusModifier.Kind.Paralized); } Debug.Log ("[FloorGimic] Enter action ("+m_fgData.onFloorAction+") to:" + a.charName ); }
private void _TestStatusApply(Actor a) { float prob = Random.Range (0.01f, 1.0f); Debug.Log ("[Item][Poison] " + prob + "/" + Mathf.Abs(statPoison)); if( prob <= Mathf.Abs(statPoison) ) { if( statPoison > 0.0f ) { a.ResolveStatus(StatusModifier.Kind.Poison); } else { a.SpawnEffect("PoisonItem"); a.AttachStatus(StatusModifier.Kind.Poison); } } prob = Random.Range (0.01f, 1.0f); Debug.Log ("[Item][Paralize] " + prob + "/" + Mathf.Abs(statParalize)); if( prob <= Mathf.Abs(statParalize) ) { if( statParalize > 0.0f ) { a.ResolveStatus(StatusModifier.Kind.Paralized); } else { a.SpawnEffect("Paralize"); a.AttachStatus(StatusModifier.Kind.Paralized); } } }