Exemplo n.º 1
0
        public void CalcurlateNumber( BattleCharacter member )
        {
            Development.TODO( "攻撃回数の計算処理の実装." );

            this.Number = Random.Range( 0, 100 ) < 10 ? 2 : 1;
            //this.Number = 2;
        }
Exemplo n.º 2
0
        /// <summary>
        /// 通常攻撃のダメージ計算.
        /// </summary>
        /// <returns>The damage.</returns>
        /// <param name="executer">Executer.</param>
        /// <param name="target">Target.</param>
        /// <param name="isCritical">If set to <c>true</c> is critical.</param>
        public static int UsuallyDamage( BattleCharacter executer, BattleCharacter target, bool isCritical )
        {
            int result = (2 * executer.InstanceData.strength - target.InstanceData.defence) / 4;
            result += Mathf.FloorToInt( ((float)result / 10.0f) * Random.Range( -1.0f, 1.0f ) );

            if( isCritical )
            {
                result *= 2;
            }

            result = result <= 0 ? 1 : result;

            return result;
        }
        private void SetTargetCharacter()
        {
            this.targetCharacter = null;
            for( int i=this.targetId,imax=this.targetGroup.Count; i<imax; i++ )
            {
                this.targetId++;
                if( this.targetGroup.List[i].IsDead )
                {
                    continue;
                }

                this.targetCharacter = this.targetGroup[i];
                break;
            }
        }
Exemplo n.º 4
0
 public void Add( BattleCharacter data )
 {
     if( this.List.Count <= 0 )
     {
         var groupElement = new Group();
         groupElement.Add( data );
         this.List.Add( groupElement );
     }
     else
     {
         var groupElement = this.List[this.List.Count - 1];
         if( groupElement[0].InstanceData.id == data.InstanceData.id )
         {
             groupElement.Add( data );
         }
         else
         {
             groupElement = new Group();
             groupElement.Add( data );
             this.List.Add( groupElement );
         }
     }
 }
Exemplo n.º 5
0
 public void Add( BattleCharacter data )
 {
     this.List.Add( data );
     this.GroupList.Add( data );
 }
Exemplo n.º 6
0
 public CommandImpactData( BattleCharacter target )
 {
     this.Target = target;
 }