Downloads containing SuperToaster.asc

Downloads
Name Author Game Mode Rating
TSF with JJ2+ Only: Anniversary Bash 26 CTF Jazz2Online Capture the flag N/A Download file
TSF with JJ2+ Only: A Cloudy DayFeatured Download Dragusela Battle 9.5 Download file
TSF with JJ2+ Only: Ancient Hall of Wisdom Slaz Capture the flag N/A Download file
JJ2+ Only: Anniversary Bash 25 CTF Jazz2Online Capture the flag N/A Download file
TSF with JJ2+ Only: Star of the year V2Featured Download TreyLina Capture the flag 8.5 Download file
TSF with JJ2+ Only: Halle der OrgelpfeifenFeatured Download Loon Capture the flag 8.7 Download file
TSF with JJ2+ Only: Western WildernessFeatured Download Dragusela Capture the flag 9.2 Download file
TSF with JJ2+ Only: Moon BaseFeatured Download Dragusela Capture the flag 9 Download file
TSF with JJ2+ Only: Anniversary Bash 24 CTF Jazz2Online Capture the flag N/A Download file
TSF with JJ2+ Only: Anniversary Bash 24 Battle Jazz2Online Battle N/A Download file
TSF with JJ2+ Only: Laboratory 38Featured Download Dragusela Battle 8 Download file
TSF with JJ2+ Only: LandfallFeatured Download Loon Battle 9.4 Download file
TSF with JJ2+ Only: Anniversary Bash 23 levels Jazz2Online Multiple N/A Download file
TSF with JJ2+ Only: SommerdammFeatured Download Loon Capture the flag 9 Download file
TSF with JJ2+ Only: The DARKEST Diamonds Killer NC Capture the flag 7.5 Download file
TSF with JJ2+ Only: Anniversary Bash 22 levels Jazz2Online Multiple N/A Download file
TSF with JJ2+ Only: Facilis descensus AvernoFeatured Download Loon Battle 8.5 Download file
Custom Weapons...Featured Download Violet CLM Other 10 Download file

File preview

#pragma require "SuperToaster.asc"
#include "MLLE-Weapons.asc"

namespace SuperToaster {
	class Weapon : MLLEWeapons::WeaponInterface {
		Weapon() {
			super(
				regularObjectTemplate: MLLEWeapons::ObjectTemplate(
					xSpeed: 1,
					xAcc: 0.125,
					curAnim: jjAnimSets[ANIM::AMMO].firstAnim + 55,
					special: -1,
					var: array<int> = {0,0,0,0,0,0,2},
					lightType: LIGHT::FLICKER,
					light: 12,
					counterEnd: 35
				),
				powerupObjectTemplate: MLLEWeapons::ObjectTemplate(
					xSpeed: 1,
					xAcc: 0.125,
					animSpeed: 2,
					curAnim: jjAnimSets[ANIM::AMMO].firstAnim + 58,
					special: -1,
					var: array<int> = {0,0,0,0,0,0,2},
					lightType: LIGHT::FLICKER,
					light: 12,
					counterEnd: 35
				),
				spread: SPREAD::TOASTER,
				style: WEAPON::POPCORN,
				pickupAnimation: jjAnimSets[ANIM::AMMO] + 57,
				poweredUpPickupAnimation: jjAnimSets[ANIM::AMMO] + 56,
				powerupAnimation: jjAnimSets[ANIM::PICKUPS] + 65,
				ammoCrateAnimation: jjAnimSets[ANIM::PICKUPS] + 58,
				replacedByBubbles: true,
				multiplier: 12,
				gradualAim: true,
				traits: se::weapon_default_traits | se::weapon_melts_ice | se::weapon_fails_underwater,
				behavior: function(obj, powerup) { obj.behavior = Behavior; if (powerup) obj.eventID = OBJECT::TOASTERBULLETPU; DefaultWeapons::DefaultSample(obj, WEAPON::TOASTER); }
			);
		}
	}
	
	void Behavior(jjOBJ@ obj) {
		if (obj.state == STATE::START) obj.xSpeed = 5 * obj.direction;
		obj.behave(BEHAVIOR::TOASTERBULLET);
		if (obj.xSpeed != 0) obj.ySpeed += 0.085;
		
		if (obj.counter > 10) {
			jjPARTICLE@ cinders = jjAddParticle(PARTICLE::FIRE);
			if (cinders !is null) {
				cinders.xPos = int(obj.xPos - 8) + jjRandom()%17;
				cinders.yPos = int(obj.yPos - 8) + jjRandom()%17;
				cinders.fire.color = obj.eventID == OBJECT::TOASTERBULLETPU? 32:40;
				cinders.fire.colorStop = obj.eventID == OBJECT::TOASTERBULLETPU? 40:48;
				cinders.fire.colorDelta = 2;
			}
		}
	}
}