public static IEnumerator TestAutoGuideEmpty() { TestHarness.OnSOF(() => { TestHarness.RunBehaviorScript("Auto Empty Guide", "mokou"); var red = BM.TPool("gem-red/b"); var baseLoc = V2RV2.NRot(1, 0); TestHarness.Check(0, () => { var e = BM.TPool("empty.1"); AreEqual(4, red.Count); for (int ii = 0; ii < 4; ++ii) { var sloc = (baseLoc + V2RV2.RX(2, 45 + ii * 90)).Bank(); var eloc = (sloc + V2RV2.RX(0.2f, 32)).Bank() + V2RV2.RY(1f + frame); SBPos(ref e[ii], eloc.TrueLocation); //90 is the direction of the empty bullet (from rotate @ mydir over the movement py + 1 t) var rloc = eloc.BankOffset(90) + V2RV2.RX(1, 80); SBPos(ref red[ii], rloc.TrueLocation); } }); }); while (TestHarness.Running) { yield return(null); } }
public static IEnumerator TestGTR2() { TestHarness.OnSOF(() => { TestHarness.RunBehaviorScript("GTR2", "mokou"); var red = BM.TPool("strip-red/w"); var blue = BM.TPool("strip-blue/w"); TestHarness.Check(0, () => { AreEqual(1, red.Count); SBPos(ref red[0], V2RV2.RX(1).TrueLocation); AreEqual(1, blue.Count); SBPos(ref blue[0], V2RV2.RX(1, 180).TrueLocation); }); TestHarness.Check(1, () => { AreEqual(2, red.Count); SBPos(ref red[1], V2RV2.RX(1, 10).TrueLocation); AreEqual(2, blue.Count); SBPos(ref blue[1], V2RV2.RX(1, 190).TrueLocation); }); TestHarness.Check(2, () => { AreEqual(2, red.Count); AreEqual(2, blue.Count); }); TestHarness.Check(3, () => { AreEqual(3, red.Count); SBPos(ref red[2], V2RV2.RX(1).TrueLocation); AreEqual(3, blue.Count); SBPos(ref blue[2], V2RV2.RX(1, 180).TrueLocation); }); TestHarness.Check(4, () => { AreEqual(4, red.Count); SBPos(ref red[3], V2RV2.RX(1, 10).TrueLocation); AreEqual(4, blue.Count); SBPos(ref blue[3], V2RV2.RX(1, 190).TrueLocation); }); TestHarness.Check(5, () => { AreEqual(4, red.Count); AreEqual(4, blue.Count); }); TestHarness.Check(6, () => { AreEqual(5, red.Count); SBPos(ref red[4], V2RV2.RX(1).TrueLocation); AreEqual(5, blue.Count); SBPos(ref blue[4], V2RV2.RX(1, 180).TrueLocation); }); TestHarness.Check(7, () => { AreEqual(6, red.Count); SBPos(ref red[5], V2RV2.RX(1, 10).TrueLocation); AreEqual(6, blue.Count); SBPos(ref blue[5], V2RV2.RX(1, 190).TrueLocation); }); }); while (TestHarness.Running) { yield return(null); } }
public static IEnumerator TestSummonAlong() { TestHarness.OnSOF(() => { TestHarness.RunBehaviorScript("SummonAlong", "mokou"); var o = BM.TPool("gem-red/w"); var bo = BM.TPool("gem-green/w"); var br = BM.TPool("gem-blue/w"); var bt = BM.TPool("gem-teal/w"); var baseLocv2 = V2(1, 0); var baseLoc = V2RV2.NRot(1, 0); var oloc = baseLoc + V2RV2.RX(1, 80); var boloc = baseLoc + V2RV2.RX(1, 160); var brloc = baseLoc + V2RV2.RX(1, 240); var btloc = baseLoc + V2RV2.RX(1, 320); //Verify summons are correct SBPos(ref o[0], oloc + V2RV2.RY(0, 30)); SBPos(ref o[1], oloc + V2RV2.RY(1, 30)); SBPos(ref bo[0], boloc.Bank() + V2RV2.RY(0)); SBPos(ref bo[1], boloc.Bank() + V2RV2.RY(1)); SBPos(ref br[0], brloc.Bank() + V2RV2.RY(0)); SBPos(ref br[1], brloc.Bank() + V2RV2.RY(1)); SBPos(ref bt[0], btloc.Bank() + V2RV2.RY(0)); SBPos(ref bt[1], btloc.Bank() + V2RV2.RY(1)); TestHarness.Check(0, () => { //Verify angle is correct SBPos(ref o[0], oloc + V2RV2.Rot(frame, 0, 30)); SBPos(ref o[1], oloc + V2RV2.Rot(frame, 1, 30)); SBPos(ref bo[0], (boloc.Bank() + V2RV2.RY(0)).Bank() + V2RV2.RX(frame, 30)); SBPos(ref bo[1], (boloc.Bank() + V2RV2.RY(1)).Bank() + V2RV2.RX(frame, 30)); var rp = (brloc.Bank() + V2RV2.RY(0)).Bank(30); SBPos(ref br[0], rp + V2RV2.RX(frame, (rp.TrueLocation - baseLocv2).ToDeg())); rp = (brloc.Bank() + V2RV2.RY(1)).Bank(30); SBPos(ref br[1], rp + V2RV2.RX(frame, (rp.TrueLocation - baseLocv2).ToDeg())); //In this case the tangent is 90 degrees from the firing direction (summonalong eq = py t) SBPos(ref bt[0], (btloc.Bank() + V2RV2.RY(0)).BankOffset(30) + V2RV2.RX(frame, 90)); SBPos(ref bt[1], (btloc.Bank() + V2RV2.RY(1)).BankOffset(30) + V2RV2.RX(frame, 90)); }); }); while (TestHarness.Running) { yield return(null); } }