static IEnumerable<EventNode> Atack( SkillParamaters paramaters ) { Messenger.AddLine( true, "{0}は{1}に殴りかかった!", paramaters.Doer.Name, paramaters.Target.Name ); yield return Damage( paramaters, 5 ).ToEventNode(); Messenger.AddLine(); yield break; }
static IEnumerable<EventNode> FireSlash( SkillParamaters paramaters ) { if( paramaters.Doers.Count() < 2 ) yield break; Messenger.AddLine( true, "{0}は{1}の協力でもって炎の剣を繰り出した!", paramaters.Doers.ElementAt( 0 ).Name, paramaters.Doers.ElementAt( 1 ).Name ); yield return Damage( paramaters, 12 ).ToEventNode(); Messenger.AddLine(); yield break; }
static IEnumerable<EventNode> PluralAtack( SkillParamaters paramaters ) { Messenger.AddLine( true, "{0}の連続攻撃!", paramaters.Doer.Name ); var rand = new Random().Next() % 3 + 2; for( int i = 0; i < rand; i++ ) { yield return Damage( paramaters, 2 ).ToEventNode(); } Messenger.AddLine(); yield break; }
static IEnumerable<EventNode> Damage( SkillParamaters paramaters, int damage ) { Messenger.AddLine( true, "{0}に{1}ダメージ!", paramaters.Target.Name, damage ); paramaters.Target.Score.Hp.Value -= damage; yield return null; }
static IEnumerable<EventNode> StarMagic( SkillParamaters paramaters ) { Messenger.AddLine( true, "{0}は星を落とす魔法を使った!", paramaters.Doer.Name ); foreach( var item in paramaters.GetTargetParamaters() ) { yield return Damage( item, 4 ).ToEventNode(); } Messenger.AddLine(); yield break; }