public Elementhit(IAudioEngine s, SceneBattle p, int pX, int pY, int sp, ChipBase.ELEMENT e) : base(s, p, pX, pY) { this.speed = sp; this.positionDirect = new Vector2(pX * 40 + 20, pY * 24 + 70); this.element = e; }
public JusticeRing( IAudioEngine so, SceneBattle p, int pX, int pY, Panel.COLOR u, int po, ChipBase.ELEMENT ele) : base(so, p, pX, pY, u, po, ele) { if (!this.flag) { return; } this.upprint = true; this.speed = 4; this.animationpoint.X = 0; --this.position.Y; this.hitrange = new Point(0, 2); this.hitting = true; this.rebirth = this.union == Panel.COLOR.blue; this.positionre = this.position; if (this.union == Panel.COLOR.red) { this.positionDirect = new Vector2(this.position.X * 40 + 20, this.position.Y * 24 + 60); } else { this.positionDirect = new Vector2((this.position.X + 1) * 40 - 20, this.position.Y * 24 + 60); } this.frame = 0; }
private static ChipBase.ELEMENT[] GetEffectiveElements(ChipBase.ELEMENT elem) { switch (elem) { case ChipBase.ELEMENT.heat: return(new[] { ChipBase.ELEMENT.aqua, ChipBase.ELEMENT.earth }); case ChipBase.ELEMENT.aqua: return(new[] { ChipBase.ELEMENT.eleki, ChipBase.ELEMENT.poison }); case ChipBase.ELEMENT.eleki: return(new[] { ChipBase.ELEMENT.leaf, ChipBase.ELEMENT.earth }); case ChipBase.ELEMENT.leaf: return(new[] { ChipBase.ELEMENT.heat, ChipBase.ELEMENT.poison }); case ChipBase.ELEMENT.poison: return(new[] { ChipBase.ELEMENT.heat, ChipBase.ELEMENT.eleki }); case ChipBase.ELEMENT.earth: return(new[] { ChipBase.ELEMENT.aqua, ChipBase.ELEMENT.leaf }); default: return(Enum.GetValues(typeof(ChipBase.ELEMENT)).Cast <ChipBase.ELEMENT>().Except(new[] { ChipBase.ELEMENT.normal }).ToArray()); } }
public Halberd( IAudioEngine so, SceneBattle p, int pX, int pY, Panel.COLOR u, int po, int s, ChipBase.ELEMENT ele, bool noEffect = false) : base(so, p, pX, pY, u, po, ele) { if (!this.flag) { return; } this.noEffect = noEffect; this.upprint = true; this.speed = s; this.animationpoint.X = 0; --this.position.Y; this.hitrange = new Point(1, 2); this.hitting = true; this.rebirth = this.union == Panel.COLOR.blue; this.positionre = this.position; if (this.union == Panel.COLOR.red) { this.positionDirect = new Vector2(this.position.X * 40 - 30, this.position.Y * 24 + 70); } else { this.positionDirect = new Vector2((this.position.X + 1) * 40 + 30, this.position.Y * 24 + 70); } this.frame = 0; }
public MonkeyPoleChip( IAudioEngine so, SceneBattle p, int pX, int pY, Panel.COLOR u, int po, int s, ChipBase.ELEMENT ele, int color) : base(so, p, pX, pY, u, po, ele) { if (!this.flag) { return; } this.color = color; this.upprint = true; this.speed = s; this.animationpoint.X = 0; this.hitrange = new Point(0, 0); this.hitting = true; this.rebirth = this.union == Panel.COLOR.blue; this.positionre = this.position; if (this.union == Panel.COLOR.red) { this.positionDirect = new Vector2(this.position.X * 40 + 72, this.position.Y * 24 + 78); } else { this.positionDirect = new Vector2((this.position.X + 1) * 40 - 72, this.position.Y * 24 + 78); } this.frame = 0; this.time = 1; }
private static ChipBase.ELEMENT[] GetEffectiveElements(ChipBase.ELEMENT elem) { switch (elem) { case ChipBase.ELEMENT.heat: return(new[] { ChipBase.ELEMENT.aqua, ChipBase.ELEMENT.earth }); case ChipBase.ELEMENT.aqua: return(new[] { ChipBase.ELEMENT.eleki, ChipBase.ELEMENT.poison }); case ChipBase.ELEMENT.eleki: return(new[] { ChipBase.ELEMENT.leaf, ChipBase.ELEMENT.earth }); case ChipBase.ELEMENT.leaf: return(new[] { ChipBase.ELEMENT.heat, ChipBase.ELEMENT.poison }); case ChipBase.ELEMENT.poison: return(new[] { ChipBase.ELEMENT.heat, ChipBase.ELEMENT.eleki }); case ChipBase.ELEMENT.earth: return(new[] { ChipBase.ELEMENT.aqua, ChipBase.ELEMENT.leaf }); default: return(new ChipBase.ELEMENT[0]); } }
public PoisonBall( IAudioEngine so, SceneBattle p, int pX, int pY, Vector2 positionDirect, Panel.COLOR u, int po, int s, int time, ChipBase.ELEMENT ele) : base(so, p, pX, pY, u, po, ele) { if (!this.flag) { return; } this.upprint = true; this.speed = s; this.animationpoint.X = 0; this.hitrange = new Point(2, 2); this.hitting = false; this.rebirth = this.union == Panel.COLOR.blue; this.positionre = this.position; this.positionDirect = positionDirect; Vector2 vector2 = this.union != Panel.COLOR.red ? new Vector2((pX + 1) * 40 - 16, pY * 24 + 80) : new Vector2(pX * 40 + 16, pY * 24 + 80); this.position.X -= this.UnionRebirth; --this.position.Y; this.frame = 0; this.time = time; this.plusposi = new Vector2((vector2.X - positionDirect.X) / time, (vector2.Y - positionDirect.Y) / time); }
public DruidManWave( IAudioEngine sound, SceneBattle parent, int pX, int pY, Panel.COLOR color, int power, int speed, ChipBase.ELEMENT element) : base(sound, parent, pX, pY, color, power, element) { if (!this.flag || !this.InArea || this.parent.panel[this.position.X, this.position.Y].Hole) { this.flag = false; } this.speed = speed; this.animationpoint.X = 0; this.hitrange = new Point(0, 0); this.hitting = true; this.rebirth = this.union == Panel.COLOR.red; this.frame = 0; }
public AttackBase( IAudioEngine s, SceneBattle p, int pX, int pY, Panel.COLOR u, int po, ChipBase.ELEMENT ele, bool counter) : base(s, p) { this.element = ele; for (int index1 = 0; index1 < this.hitflag.GetLength(0); ++index1) { for (int index2 = 0; index2 < this.hitflag.GetLength(1); ++index2) { this.hitflag[index1, index2] = false; } } this.position = new Point(pX, pY); this.power = po; this.union = u; if (this.position.X < 0 || this.position.X >= 6 || this.position.Y < 0 || this.position.Y >= 3) { this.flag = false; this.over = true; } this.canCounter = counter; }
public Plant( IAudioEngine so, SceneBattle p, int pX, int pY, Panel.COLOR u, int po, ChipBase.ELEMENT ele, CharacterBase chara) : base(so, p, pX, pY, u, po, ele) { if (!this.flag) { return; } this.invincibility = false; this.knock = true; this.breaking = true; this.canCounter = false; this.chara = chara; this.speed = 1; this.animationpoint.X = 0; this.hitrange = new Point(0, 0); this.hitting = true; this.rebirth = this.union == Panel.COLOR.blue; this.positionre = this.position; this.positionDirect = new Vector2(this.position.X * 40 + 20, this.position.Y * 24 + 64); this.frame = 0; this.BadStatusSet(CharacterBase.BADSTATUS.stop, 60); this.StandPanel.State = Panel.PANEL._grass; }
public FireBreath( IAudioEngine so, SceneBattle p, int pX, int pY, Panel.COLOR u, int po, int s, ChipBase.ELEMENT ele, int endX) : base(so, p, pX, pY, u, po, ele) { if (!this.flag) { return; } this.endX = endX; this.nextmake = s; this.speed = 1; this.animationpoint.X = 0; this.hitrange = new Point(0, 0); this.hitting = true; this.rebirth = this.union == Panel.COLOR.blue; this.positionre = this.position; if (this.union == Panel.COLOR.blue) { this.positionDirect = new Vector2(this.position.X * 40 - 8, this.position.Y * 24 + 42); } else { this.positionDirect = new Vector2((this.position.X + 1) * 40 + 8, this.position.Y * 24 + 42); } this.frame = 0; this.sound.PlaySE(SoundEffect.heat); }
public DelayScissor( IAudioEngine so, SceneBattle p, int pX, int pY, Panel.COLOR u, int po, int hittime, ChipBase.ELEMENT ele, Vector2 startPosi, bool sp, int hp = 10) : base(so, p, pX, pY, u, po, ele) { if (!this.flag) { return; } this.hp = hp; this.invincibility = true; this.hitting = false; this.hittime = hittime; this.animationpoint.X = 0; this.animationpoint.Y = sp ? 2 : 0; this.hitrange = new Point(0, 0); this.rebirth = this.union == Panel.COLOR.blue; this.positionre = this.position; this.positionDirect = startPosi; Vector2 vector2 = new Vector2(this.position.X * 40 + 20, this.position.Y * 24 + 50); this.movespeed.X = (vector2.X - startPosi.X) / hittime; this.movespeed.Y = (vector2.Y - startPosi.Y) / hittime; this.frame = 0; this.breaking = false; }
public ShotGun( IAudioEngine so, SceneBattle p, int pX, int pY, Panel.COLOR u, int po, ChipBase.ELEMENT ele) : base(so, p, pX, pY, u, po, ele) { if (!this.flag) { return; } this.invincibility = false; this.speed = 1; this.animationpoint.X = 0; this.hitrange = new Point(0, 0); this.hitting = true; this.rebirth = this.union == Panel.COLOR.blue; this.positionre = this.position; if (this.union == Panel.COLOR.red) { this.positionDirect = new Vector2(this.position.X * 40 + 4, this.position.Y * 24 + 42); } this.frame = 0; this.sound.PlaySE(SoundEffect.bomb); this.parent.effects.Add(new Basterhit(this.sound, this.parent, this.position.X, this.position.Y, 1)); }
public MeteorRay( IAudioEngine so, SceneBattle p, int pX, int pY, Panel.COLOR u, int po, int s, ChipBase.ELEMENT ele) : base(so, p, pX, pY, u, po, ele) { if (!this.flag) { return; } this.speed = s; this.animationpoint.X = 0; this.hitrange = new Point(0, 0); this.hitting = false; this.rebirth = this.union != Panel.COLOR.blue; this.positionre = this.position; if (this.union == Panel.COLOR.red) { this.positionDirect = new Vector2(this.position.X * 40 - 5, this.position.Y * 24 + 20); } else { this.positionDirect = new Vector2((this.position.X + 1) * 40 + 8, this.position.Y * 24 + 20); } this.frame = 0; this.time = 9; this.parent.attacks.Add(new Dummy(this.sound, this.parent, this.position.X, this.position.Y, this.union, this.hitrange, this.speed * (this.time / 2), true)); }
public FighterSword( IAudioEngine so, SceneBattle p, int pX, int pY, Panel.COLOR u, int po, int s, ChipBase.ELEMENT ele) : base(so, p, pX, pY, u, po, ele) { if (!this.flag) { return; } this.speed = s; this.animationpoint.X = 0; this.hitrange = new Point(2, 0); this.hitting = true; this.rebirth = this.union == Panel.COLOR.blue; this.positionre = this.position; if (this.union == Panel.COLOR.red) { this.positionDirect = new Vector2(this.position.X * 40 - 16, this.position.Y * 24 + 70); } else { this.positionDirect = new Vector2((this.position.X + 1) * 40 + 16, this.position.Y * 24 + 64); } this.frame = 0; }
public IceSpike( IAudioEngine so, SceneBattle p, int pX, int pY, Panel.COLOR u, int po, int s, ChipBase.ELEMENT ele) : base(so, p, pX, pY, u, po, ele) { if (!this.flag) { return; } this.speed = s; this.animationpoint.X = 0; this.hitrange = new Point(0, 0); this.hitting = false; this.rebirth = this.union == Panel.COLOR.blue; this.positionre = this.position; if (this.union == Panel.COLOR.red) { this.positionDirect = new Vector2(this.position.X * 40 + 20, this.position.Y * 24 + 96); } else { this.positionDirect = new Vector2(this.position.X * 40 + 20, this.position.Y * 24 + 96); } this.frame = 0; this.time = 1; this.shadow = new Shadow(this.sound, this.parent, this.position.X, this.position.Y, this); this.parent.effects.Add(shadow); }
public WebBomb( IAudioEngine so, SceneBattle p, int pX, int pY, Panel.COLOR u, int po, int s, Vector2 v, Point end, int t, int heattime, ChipBase.ELEMENT element) : base(so, p, pX, pY, u, po, element) { this.heattime = heattime; this.breaking = true; this.hitting = false; this.speed = s; this.positionDirect = v; this.time = t; this.position = end; this.invincibility = false; this.endposition = new Vector2(end.X * 40 + 20, end.Y * 24 + 80); this.movex = (v.X - this.endposition.X) / t; this.movey = (v.Y - this.endposition.Y) / t; this.plusy = 0.0f; this.speedy = 6f; this.plusing = this.speedy / (this.time / 2); this.rebirth = this.union == Panel.COLOR.red; }
public Vulcan( IAudioEngine so, SceneBattle p, int pX, int pY, Panel.COLOR u, int po, Vulcan.SHOT s, ChipBase.ELEMENT ele, bool bre) : base(so, p, pX, pY, u, po, ele) { if (!this.flag) { return; } this.knock = true; this.invincibility = false; this.breaking = bre; this.hitrange = new Point(0, 0); this.hitting = true; this.rebirth = this.union == Panel.COLOR.blue; this.positionre = this.position; this.shot = s; this.frame = 0; this.positionDirect.Y = 82 + 24 * this.position.Y; }
public ElekiFang( IAudioEngine so, SceneBattle p, int pX, int pY, Panel.COLOR u, int po, int s, ChipBase.ELEMENT ele, bool single = false) : base(so, p, pX, pY, u, po, ele) { if (!this.flag) { return; } this.single = single; this.speed = s; this.animationpoint.X = 0; this.hitrange = new Point(0, 0); this.hitting = true; this.rebirth = this.union == Panel.COLOR.blue; this.positionre = this.position; if (this.union == Panel.COLOR.red) { this.positionDirect = new Vector2(this.position.X * 40 - 5, this.position.Y * 24 + 48); } else { this.positionDirect = new Vector2((this.position.X + 1) * 40 + 5, this.position.Y * 24 + 48); } this.frame = 0; this.time = 10; }
public Smoke(IAudioEngine s, SceneBattle p, int pX, int pY, ChipBase.ELEMENT ele) : base(s, p, pX, pY) { this.speed = 2; this.positionDirect = new Vector2(pX * 40 + 20, pY * 24 + 80); this.animationpoint.Y = (int)ele; }
public BombAttack( IAudioEngine so, SceneBattle p, int pX, int pY, Panel.COLOR u, int po, int s, int time, Point range, ChipBase.ELEMENT ele) : base(so, p, pX, pY, u, po, ele) { if (!this.flag) { return; } this.upprint = true; this.speed = s; this.animationpoint.X = 0; this.hitrange = range; this.hitting = true; this.rebirth = this.union == Panel.COLOR.blue; this.positionre = this.position; if (this.union == Panel.COLOR.red) { this.positionDirect = new Vector2(this.position.X * 40 - 5, this.position.Y * 24 + 48); } else { this.positionDirect = new Vector2((this.position.X + 1) * 40 + 5, this.position.Y * 24 + 48); } this.frame = 0; this.time = time; }
public SwordCloss( IAudioEngine so, SceneBattle p, int pX, int pY, Panel.COLOR u, int po, int s, ChipBase.ELEMENT ele, bool par) : base(so, p, pX, pY, u, po, ele) { if (!this.flag) { return; } this.parry = par; this.upprint = true; this.speed = s; this.animationpoint.X = 0; this.hitrange = new Point(0, 0); this.hitting = true; this.rebirth = this.union == Panel.COLOR.blue; this.positionre = this.position; if (this.union == Panel.COLOR.red) { this.positionDirect = new Vector2(this.position.X * 40 + 20, this.position.Y * 24 + 76); } else { this.positionDirect = new Vector2((this.position.X + 1) * 40 - 18, this.position.Y * 24 + 76); } this.frame = 0; this.power *= 2; }
public CanonBullet( IAudioEngine so, SceneBattle p, int pX, int pY, Vector2 positionDirect, Panel.COLOR u, int po, ChipBase.ELEMENT ele, bool spled = false) : base(so, p, pX, pY, u, po, ele) { if (!this.flag) { return; } this.spled = spled; this.invincibility = true; this.movespeed = 8; this.speed = 1; this.animationpoint.X = 0; this.hitrange = new Point(0, 0); this.hitting = true; this.breaking = true; this.rebirth = this.union == Panel.COLOR.blue; this.positionre = this.position; this.positionDirect = positionDirect; this.frame = 0; this.OldPD = positionDirect; }
public yuyuFireball( IAudioEngine so, SceneBattle p, int pX, int pY, Panel.COLOR u, int po, int s, Vector2 v, ChipBase.ELEMENT ele, int movespeed) : base(so, p, pX, pY, u, po, ele) { this.movespeed = movespeed; this.invincibility = true; //this.breakinvi = true; this.breaking = true; this.speed = s; //this.positionDirect = v; this.positionDirect.X = this.position.X * 40; this.positionDirect.Y = 82 + 24 * this.position.Y; this.positionold = this.position; this.OldPD = this.positionDirect; //this.animationpoint.X = 2; }
public EriaSteel( IAudioEngine so, SceneBattle p, int pX, int pY, Panel.COLOR u, int po, ChipBase.ELEMENT ele) : base(so, p, pX, pY, u, po, ele) { if (!this.flag) { return; } this.upprint = false; this.animationpoint.X = 0; this.speed = 2; this.hitrange = new Point(0, 0); this.hitting = false; this.rebirth = this.union == Panel.COLOR.blue; this.positionre = this.position; this.positionDirect = new Vector2(this.position.X * 40 + 20, this.position.Y * 24 - 110); this.rehit = true; this.frame = 0; }
public EnemyHit( IAudioEngine so, SceneBattle p, int pX, int pY, Panel.COLOR u, int po, ChipBase.ELEMENT ele, CharacterBase chara) : base(so, p, pX, pY, u, po, ele) { if (!this.flag) { return; } this.breaking = true; this.upprint = true; this.speed = 1; this.animationpoint.X = 0; this.hitrange = new Point(0, 0); this.hitting = true; this.rebirth = this.union == Panel.COLOR.blue; this.positionre = this.position; if (this.union == Panel.COLOR.red) { this.positionDirect = new Vector2(this.position.X * 40 - 5, this.position.Y * 24 + 48); } else { this.positionDirect = new Vector2((this.position.X + 1) * 40 + 5, this.position.Y * 24 + 48); } this.frame = 0; this.chara = chara; this.hitflag = chara.hitflag; }
public Smoke(IAudioEngine s, SceneBattle p, Vector2 pd, Point posi, ChipBase.ELEMENT ele) : base(s, p, posi.X, posi.Y) { this.downprint = true; this.speed = 2; this.positionDirect = pd; this.animationpoint.Y = (int)ele; }
public WaveAttsck( IAudioEngine so, SceneBattle p, int pX, int pY, Panel.COLOR u, int po, int s, int panelchange, ChipBase.ELEMENT ele) : base(so, p, pX, pY, u, po, ele) { if (!this.flag || !this.InArea) { return; } this.panelchange = panelchange; this.nextmake = s; this.speed = 4; this.animationpoint.X = 0; this.hitrange = new Point(0, 0); this.hitting = true; this.rebirth = this.union == Panel.COLOR.blue; this.positionre = this.position; if (this.union == Panel.COLOR.red) { this.positionDirect = new Vector2(this.position.X * 40 - 5, this.position.Y * 24 + 42); } else { this.positionDirect = new Vector2((this.position.X + 1) * 40 + 5, this.position.Y * 24 + 42); } this.frame = 0; if (this.parent.panel[this.position.X, this.position.Y].Hole) { this.flag = false; } else { this.sound.PlaySE(SoundEffect.shotwave); } switch (panelchange) { case 1: if (!this.StandPanel.Hole) { this.StandPanel.state = Panel.PANEL._sand; break; } break; case 2: this.StandPanel.Crack(); break; } }
private bool WeakPoint(ChipBase.ELEMENT attackele, ChipBase.ELEMENT damageele) { bool flag = false; switch (damageele) { case ChipBase.ELEMENT.heat: if (attackele == ChipBase.ELEMENT.aqua || attackele == ChipBase.ELEMENT.earth) { flag = true; break; } break; case ChipBase.ELEMENT.aqua: if (attackele == ChipBase.ELEMENT.eleki || attackele == ChipBase.ELEMENT.poison) { flag = true; break; } break; case ChipBase.ELEMENT.eleki: if (attackele == ChipBase.ELEMENT.leaf || attackele == ChipBase.ELEMENT.earth) { flag = true; break; } break; case ChipBase.ELEMENT.leaf: if (attackele == ChipBase.ELEMENT.heat || attackele == ChipBase.ELEMENT.poison) { flag = true; break; } break; case ChipBase.ELEMENT.poison: if (attackele == ChipBase.ELEMENT.heat || attackele == ChipBase.ELEMENT.eleki) { flag = true; break; } break; case ChipBase.ELEMENT.earth: if (attackele == ChipBase.ELEMENT.aqua || attackele == ChipBase.ELEMENT.leaf) { flag = true; break; } break; } return(flag); }
public SandHoleAttack( IAudioEngine so, SceneBattle p, int pX, int pY, Panel.COLOR u, int po, int t, int c, SandHoleAttack.MOTION m, ChipBase.ELEMENT ele, bool warnPanel = false) : base(so, p, pX, pY, u, po, ele) { if (!this.flag) { return; } this.downprint = true; this.time = t; this.speed = 5; this.animationpoint.X = 0; this.hitrange = new Point(0, 0); this.hitting = false; this.rebirth = this.union == Panel.COLOR.blue; this.positionre = this.position; this.positionDirect = new Vector2(this.position.X * 40 + 20, this.position.Y * 24 + 82); this.animationpoint.Y = c; this.motion = m; switch (this.motion) { case SandHoleAttack.MOTION.init: if (this.element == ChipBase.ELEMENT.leaf) { this.sound.PlaySE(SoundEffect.sand); this.parent.panel[this.position.X, this.position.Y].state = Panel.PANEL._grass; break; } this.parent.panel[this.position.X, this.position.Y].state = Panel.PANEL._sand; this.sound.PlaySE(SoundEffect.sand); this.element = ChipBase.ELEMENT.earth; break; case SandHoleAttack.MOTION.set: this.hitting = true; break; } if (warnPanel) { this.parent.attacks.Add(new Dummy(so, p, pX, pY, u, Point.Empty, 4 * this.speed, true)); } this.frame = 0; }