예제 #1
0
 public int Shield(int _value, HEALSOURCE _source)
 {
     absorb[absAmount++] = new Absorb(_value, _source);
     totalAbsorb        += _value;
     soldier.frame.GetComponent <scrUnitPanel>().RefreshHealthInfo();
     return(_value);
 }
예제 #2
0
파일: Board.cs 프로젝트: CombNITNC/Hibiki
        void OnChange(Virus.Id id, Position from, Position to)
        {
            var changed = VirusFromId(id).First();

            changed.VirusPosition = to;

            // Pull up
            if (1 < to.Y && to.Y < from.Y)
            {
                Where(to.WithY(to.Y + 1), downer => Change.Invoke(downer.VirusId, downer.VirusPosition, to));
            }

            // Place
            if (1 < to.Y && from == Position.Hand())
            {
                Where(to.WithY(to.Y - 1), upper => {
                    if (!(
                            (upper.VirusGrade == Virus.Grade.Big && changed.VirusGrade == Virus.Grade.Mid) ||
                            (upper.VirusGrade == Virus.Grade.Mid && changed.VirusGrade == Virus.Grade.Tiny)
                            ))
                    {
                        return;
                    }
                    Absorb.Invoke(upper.VirusId, changed.VirusId);
                });
            }
        }
예제 #3
0
 public override void Cast_Spell(Summon s)
 {
     base.Cast_Spell(s);
     if (Random.Range(0, 101) > 90)
     {
         results += new Absorb().Do_Ability(s);
     }
 }
예제 #4
0
 public void Initialize()
 {
     player       = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerController>();
     GM           = GameObject.FindGameObjectWithTag("Managers").GetComponent <GameManager>();
     laser        = GetComponentInChildren <LaserGun>();
     flameThrower = GetComponentInChildren <FlameThrower>();
     hJump        = GetComponentInChildren <HyperJump>();
     hDash        = GetComponentInChildren <HyperDash>();
     mLauncher    = GetComponentInChildren <MisileLauncher>();
     absorb       = GetComponentInChildren <Absorb>();
     laser.Initialize();
     flameThrower.Initialize();
     hJump.Initialize();
     hDash.Initialize();
     mLauncher.Initialize();
     absorb.Initialize();
 }
예제 #5
0
파일: Helpers.cs 프로젝트: Phytal/Nayu
        public static AttackResult ExecuteAttack(ShardedCommandContext context, Core.Entities.Chomusuke activeChomusuke,
                                                 string attack)
        {
            var result = new AttackResult();

            switch (attack)
            {
            case "Slash":
                result = Slash.SlashAttack(context);
                break;

            case "Block":
                result = Block.BlockAttack(context);
                break;

            case "Deflect":
                result = Deflect.DeflectAttack(context);
                break;

            case "Absorb":
                result = Absorb.AbsorbAttack(context);
                break;

            case "Bash":
                result = Bash.BashAttack(context);
                break;

            case "Fireball":
                result = Fireball.FireballAttack(context);
                break;

            case "Earthquake":
                result = Earthquake.EarthquakeAttack(context);
                break;

            case "Meditate":
                result = Meditate.MeditateAttack(context, activeChomusuke);
                break;
            }

            return(result);
        }
예제 #6
0
        public byte[] ToByteArray()
        {
            List <byte> result = new List <byte>(25);

            result.Add(PA);
            result.Add(MA);
            result.Add(Speed);
            result.Add(Move);
            result.Add(Jump);
            result.AddRange(PermanentStatuses.ToByteArray());
            result.AddRange(StatusImmunity.ToByteArray());
            result.AddRange(StartingStatuses.ToByteArray());
            result.Add(Absorb.ToByte());
            result.Add(Cancel.ToByte());
            result.Add(Half.ToByte());
            result.Add(Weak.ToByte());
            result.Add(Strong.ToByte());

            return(result.ToArray());
        }
예제 #7
0
 // Use this for initialization
 void Start()
 {
     absorb = GetComponentInChildren <Absorb>();
 }