public int Shield(int _value, HEALSOURCE _source) { absorb[absAmount++] = new Absorb(_value, _source); totalAbsorb += _value; soldier.frame.GetComponent <scrUnitPanel>().RefreshHealthInfo(); return(_value); }
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); }); } }
public override void Cast_Spell(Summon s) { base.Cast_Spell(s); if (Random.Range(0, 101) > 90) { results += new Absorb().Do_Ability(s); } }
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(); }
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); }
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()); }
// Use this for initialization void Start() { absorb = GetComponentInChildren <Absorb>(); }