Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Nuclear Throne Corrupted
- // Original mod by Time
- // Slight edit/update by YellowAfterlife
- // Special thanks to 9joao6
- global.rhinoSkin = skill_get(1);
- global.visuals = true;
- global.bosses = true;
- global.weapons = true;
- global.mutations = true;
- trace("Do /ntc_help for commands.");
- #define game_start
- wait 1;
- if (global.mutations) with (Player) {
- maxhealth *= 2;
- my_health = maxhealth;
- }
- global.rhinoSkin = skill_get(1);
- #define scr_enabled(v)
- return v ? "enabled" : "disabled";
- #define chat_command(cmd, par, plr)
- switch (cmd) {
- case "ntc_help":
- trace("Mode toggle commands:");
- trace("/ntc_visuals: Toggle visual effects (coloring)");
- trace("/ntc_bosses: Toggle NTC-specific boss mixes");
- trace("/ntc_weapons: Toggle weapon/projectile effects");
- trace("/ntc_player: Toggle player effects (more health, portal heal, ...)");
- return true;
- case "ntc_visuals":
- global.visuals ^= 1;
- trace("NTC visual effects are now " + scr_enabled(global.visuals) + ".");
- return true;
- case "ntc_bosses":
- global.bosses ^= 1;
- trace("NTC bosses are now " + scr_enabled(global.bosses) + ".");
- return true;
- case "ntc_weapons":
- global.weapons ^= 1;
- trace("NTC weapon effects are now " + scr_enabled(global.weapons) + ".");
- return true;
- case "ntc_player":
- global.mutations ^= 1;
- trace("NTC player effects are now " + scr_enabled(global.mutations) + ".");
- return true;
- }
- #define scr_end_step
- if (!global.visuals) exit;
- // Colors:
- with (PortalL) image_blend = $0000CC;
- with (Laser) image_blend = $0000CC;
- with (Explosion) image_blend = $0000CC;
- //
- scr_hue(AmmoChest, 200, 255);
- scr_hue(GiantAmmoChest, 200, 255);
- scr_hue(WeaponChest, 200, 255);
- scr_hue(GiantWeaponChest, 200, 255);
- scr_hue(RadChest, 200, 255);
- //
- scr_hue(PlasmaBall, 500, 170);
- scr_hue(PlasmaBig, 500, 170);
- scr_hue(PlasmaHuge, 500, 170);
- scr_hue(Laser, 200, 240);
- with (instances_matching(ToxicGas, "ntc_recolor", undefined)) {
- ntc_recolor = true;
- image_blend = $990099;
- }
- #macro mcr_scale 1.05
- #define step
- //
- with (Spiral) {
- image_xscale *= random_range(1/mcr_scale, mcr_scale);
- image_yscale *= random_range(1/mcr_scale, mcr_scale);
- }
- //
- var q;
- // Extra feet:
- if (skill_get(2)) with (Player) maxspeed = 8;
- if (skill_get(1) && !global.rhinoSkin) {
- global.rhinoSkin = true;
- with (Player) {
- maxhealth += 4;
- my_health += 4;
- }
- with (Revive) maxhealth += 4;
- }
- // Rebind visual script:
- q = noone;
- with (instances_matching(CustomEndStep, "name", "ntc_end_step")) q = id;
- if (q == noone) with (script_bind_end_step(scr_end_step, 0)) name = "ntc_end_step";
- // Heal on portals:
- if (global.mutations && instance_exists(Portal)) {
- with (Player) my_health = maxhealth;
- }
- /*with (Player) if (button_check(index, "horn")) {
- with (GameObject) {
- image_xscale *= random_range(1/mcr_scale, mcr_scale);
- image_yscale *= random_range(1/mcr_scale, mcr_scale);
- }
- }*/
- if (global.bosses) scr_bosses();
- if (global.weapons) scr_weapons();
- #define scr_bosses
- // Bosses:
- scr_replace(Van, Last);
- var l2p = (GameCont.loops >= 2);
- if (l2p) with (scr_replace_ret(Last, ScrapBoss)) my_health = 12;
- with (scr_replace_ret(BanditBoss, FrogQueen)) my_health = 1000;
- with (LilHunter) {
- repeat (l2p ? 8 : 4) {
- with (instance_create(x, y, ScrapBoss)) my_health = l2p ? 800 : 450;
- }
- repeat (l2p ? 2 : 1) {
- with (instance_create(x, y, FrogQueen)) my_health = 650;
- }
- image_angle = random(360);
- instance_destroy();
- }
- with (HyperCrystal) {
- repeat (l2p ? 6 : 2) {
- with (instance_create(x, y, CrownGuardianOld)) my_health = 700;
- }
- instance_destroy();
- }
- with (TechnoMancer) {
- repeat (l2p ? 2 : 1) {
- with (instance_create(x, y, Nothing2)) my_health = 1500;
- }
- instance_destroy();
- }
- if (instance_exists(Generator)) {
- with (scr_replace_ret(ThroneStatue, Guardian)) my_health = 300;
- }
- if (GameCont.area == 2) with (FrogQueen) {
- with (instance_create(x, y, Turtle)) {
- my_health = 2000;
- image_xscale = 5;
- image_yscale = 5;
- speed = other.speed;
- direction = other.direction;
- image_angle = random(360);
- }
- instance_destroy();
- }
- if (GameCont.area == 3) {
- with (scr_replace_ret(ScrapBoss, EnemyHorror)) my_health = 2000;
- }
- scr_replace(BonePileNight, FrogQueen);
- scr_replace(Grunt, PopoFreak);
- scr_replace(Inspector, EliteInspector);
- scr_replace(Shielder, EliteShielder);
- #define scr_weapons
- // Projectiles:
- with (scr_replace_ret(Bullet1, CarThrow)) {
- ntc_team = team;
- team = 0;
- }
- with (CarThrow) if ("ntc_team" in self) with (instance_create(x, y, Flame)) {
- speed = random(8);
- direction = other.direction + random_range(-45, 45);
- image_angle = other.direction;
- team = other.ntc_team;
- }
- with (scr_replace_ret(Bullet2, PlasmaBall)) speed = 25;
- scr_replace(Slash, Bolt);
- with (LightningBall) with (instance_create(x, y, Flame)) {
- speed = random(8);
- direction = other.direction + random_range(-45, 45);
- image_angle = direction;
- team = other.team;
- }
- scr_replace(DragonBurst, FlameBall);
- with (FlameBurst) {
- repeat (6) with (instance_create(x, y, FlameBall)) {
- speed = other.speed;
- direction = other.direction;
- image_angle = random(360);
- team = other.team;
- }
- instance_destroy();
- }
- scr_replace(Slug, PlasmaBig);
- with (instances_matching(Grenade, "ntc_grenade", undefined)) scr_grenade();
- scr_replace(BouncerBullet, Devastator);
- scr_replace(Bolt, FlakBullet);
- scr_replace(Lightning, EnemyBullet1);
- scr_replace(Laser, BloodBall);
- scr_replace(Seeker, Nuke);
- scr_replace(Splinter, SentryGun);
- with (FlameShell) {
- repeat (2) with (instance_create(x, y, UltraShell)) {
- speed = other.speed;
- direction = other.direction;
- image_angle = random(360);
- team = other.team;
- image_xscale = 2;
- image_yscale = 2;
- }
- instance_destroy();
- }
- scr_replace(HeavyBullet, Nuke);
- scr_replace(Shank, FlameBall);
- scr_replace_spread(UltraBolt, Disc, 7, 10);
- scr_replace(HeavyBolt, FlakBullet);
- //
- with (EnergyShank) {
- repeat (3) with (instance_create(x, y, UltraBullet)) {
- speed = 18;
- friction = 1;
- direction = other.direction + random_range(-15, 15);
- image_angle = random(360);
- team = other.team;
- scr_ultra_bullet();
- }
- instance_destroy();
- }
- scr_replace_spread(EnergySlash, EnergyShank, 3, 10);
- scr_replace_spread(EnergyHammerSlash, EnergySlash, 3, 10);
- //
- with (instances_matching(Rocket, "ntc_rocket", undefined)) scr_rocket();
- scr_replace(BloodSlash, EnergyHammerSlash);
- scr_replace(LightningSlash, EnergyHammerSlash);
- scr_replace(HeavySlug, ProtoChest);
- scr_replace(PlasmaHuge, GiantWeaponChest);
- scr_replace(ToxicBolt, GiantAmmoChest);
- //with (Disc) speed = 100;
- with (instances_matching(Disc, "ntc_disc", undefined)) {
- ntc_disc = true;
- sprite_index = sprTurtleFire;
- image_angle = random(360);
- speed = 15;
- alarm0 = -1;
- }
- scr_replace(HyperSlug, LastBall);
- with (PlasmaBall) if (team >= 0) speed = 25;
- with (PlasmaBig) if (team >= 0) speed = 30;
- scr_replace(Flare, LastBall);
- #define scr_hue(obj, sat, val)
- with (obj) {
- var h = (("hue" in self) ? hue + 1 : 0) % 256;
- hue = h;
- image_blend = make_color_hsv(h, sat, val);
- }
- #define scr_replace_ret(obj, next)
- var r = array_create(instance_number(obj));
- var i = 0;
- with (obj) {
- var q = instance_create(x, y, next);
- q.speed = speed;
- q.direction = direction;
- q.image_angle = random(360);
- if ("team" in self) q.team = team;
- r[i++] = q;
- instance_destroy();
- }
- return r;
- #define scr_replace(obj, next)
- with (obj) {
- var q = instance_create(x, y, next);
- q.speed = speed;
- q.direction = direction;
- q.image_angle = random(360);
- if ("team" in self) q.team = team;
- instance_destroy();
- }
- #define scr_replace_spread(obj, next, count, spread)
- with (obj) {
- repeat (count) with (instance_create(x, y, next)) {
- speed = other.speed;
- direction = other.direction + random_range(-1, 1) * spread;
- image_angle = random(360);
- if ("team" in other) team = other.team;
- }
- instance_destroy();
- }
- #define scr_grenade
- ntc_grenade = true;
- if (!fork()) exit;
- var r1, r2, rx, rt = 0, obj;
- switch (object_index) {
- case MiniNade:
- r1 = 48;
- r2 = 96;
- rx = 24;
- obj = SmallExplosion;
- break;
- case PopoNade: exit; // no
- case ToxicGrenade:
- r1 = 32;
- r2 = 96;
- rx = 16;
- obj = ToxicGas;
- break;
- case Flare: exit;
- case ClusterNade:
- r1 = 48;
- r2 = 160;
- rx = 32;
- obj = Explosion;
- break;
- case HeavyNade:
- r1 = 64;
- r2 = 160;
- rx = 32;
- obj = Explosion;
- break;
- case UltraGrenade:
- r1 = 64;
- r2 = r1+64;
- rx = 64;
- obj = GreenExplosion;
- break;
- case BloodGrenade:
- r1 = 40;
- r2 = 40;
- rx = 32;
- rt = team;
- obj = MeatExplosion;
- break;
- case BloodBall:
- r1 = 40;
- r2 = 64+8;
- rx = 32;
- rt = team;
- obj = MeatExplosion;
- break;
- case ConfettiBall:
- r1 = 24;
- r2 = 160;
- rx = 8;
- obj = Confetti;
- break;
- default:
- r1 = 48;
- r2 = 160;
- rx = 32;
- obj = SmallExplosion;
- }
- var q = creator, qx, qy, qz;
- var qz = instance_exists(q);
- if (qz) {
- qx = q.x; qy = q.y;
- } else {
- qx = x; qy = y;
- }
- for (var r = r1; r <= r2; r += rx) {
- var n = ceil(r * (3.141592 * 2) / rx);
- var d = random(360);
- repeat (n) {
- var ex = qx + lengthdir_x(r, d);
- var ey = qy + lengthdir_y(r, d);
- with (qz ? q : self) {
- if (collision_circle(ex, ey, 16, Floor, false, false) != noone) {
- with (instance_create(ex, ey, obj)) {
- ntc_grenade = true;
- creator = q;
- team = rt;
- switch (obj) {
- case Confetti:
- motion_add(d + 90, 2);
- break;
- case ToxicGas:
- direction = d;
- speed = 0.5;
- break;
- }
- }
- }
- break;
- }
- d += 360 / n;
- }
- wait 1;
- qz = instance_exists(q);
- if (qz) { qx = q.x; qy = q.y; }
- }
- if (instance_exists(self)) {
- instance_change(GameObject, false);
- instance_destroy();
- }
- #define scr_rocket
- ntc_rocket = true;
- if (!fork()) exit;
- repeat (15) {
- var q = instance_create(x, y, HealthChest);
- q.speed = speed;
- q.direction = direction;
- q.image_angle = random(360);
- wait 1;
- if (!instance_exists(self)) exit;
- }
- instance_destroy();
- #define scr_ultra_bullet
- if (!fork()) exit;
- while (instance_exists(self)) {
- if (speed <= 0) {
- with (instance_create(x, y, MeatExplosion)) {
- creator = other.creator;
- team = other.team;
- }
- instance_destroy();
- exit;
- }
- wait 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement