Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define init
- /*
- Bandit
- Active: Bash Attack
- * A bash attack
- Passive: Low Capacity
- * Lower max level
- * Bandit Blaster Only
- Thronebutt
- * Crow Blaster
- Ultra A
- * Decrease level to 4 + (Times Ultra A is taken)
- * Increases Bash Base Damage by 2 when taken more than three times
- Ultra B
- * Increases base Bash damage
- * Big Bandit Gun found, but only if Ultra A is taken < 3 times
- */
- global.Ultra[1] = 0;
- global.Ultra[2] = 0;
- global.holiday = 0;
- #define race_name
- return "Bandit";
- #define race_mapicon
- return sprBanditIdle
- #define race_text
- return "Low Capacity#High Hopes"
- #define race_swep
- return 0;
- #define race_tb_text
- return "Improved Bandit Blaster"
- #define race_tb_take
- //
- #define race_ultra_name
- switch (argument0) {
- case 1: return "High Capacity";
- case 2: return "Big Bash";
- default: return "";
- }
- #define race_ultra_text
- switch (argument0) {
- case 1: if global.Ultra[1] <= 3
- return "More Levelups"
- else return "Minor Buff to Bash Attack";
- /// Buff to Passive ability. Reduces your current level from 7 to 4 to gain
- /// 5 more mutations in total. Current Rads are also reduced to 0.
- case 2: if global.Ultra[1] >= 2 return "Improved Bash attack"
- else return "Improved Bash Attack#Free Blaster Upgrade"
- /// Buff to Active ability. Functions exactly as Big Bandit's attack.
- default: return "";
- }
- #define race_ultra_take
- global.Ultra[argument0] += 1;
- if global.Ultra[1] > 0 && argument0 = 1{
- if global.Ultra[1] <= 3 {
- GameCont.level = 2 + instance_number(Player) + global.Ultra[1];//4 + Ultra, 5 + Ultra with 2p
- GameCont.rad = 0;
- GameCont.skillpoints = 0;
- }else{
- dmg_bash_base = 6;
- }
- }
- if global.Ultra[2] > 0{
- if global.Ultra[1] < 3 global.Ultra[2]++;
- dmg_bash_base = 12;
- }
- #define race_ttip
- return choose("FHO'FAASHYN");
- #define obj_create
- // obj_create(x,y)
- // type added when necessary, but only when
- // (it is not necessary here)
- ID = instance_create(argument0,argument1,CustomObject);
- with(ID){
- on_step = script_ref_create(bullet_step);
- on_draw = script_ref_create(bullet_draw);
- on_destroy = script_ref_create(bullet_destroy);
- if skill_get(17) = 0{
- col1 = make_color_rgb(165,25,60)
- col2 = make_color_rgb(252,56,0)
- col3 = make_color_rgb(255,133,99)
- col4 = c_white;
- }else{
- col1 = make_color_rgb(60,25,165)
- col2 = make_color_rgb(0,56,252)
- col3 = make_color_rgb(99,133,255)
- col4 = c_white;
- if random(10) < 1{
- with(instance_create(x+4-random(8),y+4-random(8),PortalL)){
- depth = other.depth + choose(1,-1,-1);
- image_blend = c_aqua;
- }
- }
- }
- len = 0;
- lifetime = 0;
- queuedestroy = 0;
- recycled = 0;
- if skill_get(15) bounce = 3 else bounce = 0;
- }
- return ID;
- #define bullet_step
- if instance_exists(self){
- lifetime++;
- if lifetime > 30*6 queuedestroy = 1;
- if speed > 6 speed -= 0.25;
- var nearestEnemy = instance_nearest(x,y,enemy);
- if place_meeting(x+hspeed,y+vspeed,Wall){//collision_point(x+hspeed,y+vspeed,Wall,0,1){
- if bounce > 0{
- direction = (direction + 180 + 45 - random(90)) mod 360;
- bounce--;
- if bounce <= 0 queuedestroy = 1;
- }else{
- instance_create(x,y,EBulletHit);
- queuedestroy = 1;
- }
- x -= hspeed;
- y -= vspeed;
- }
- if place_meeting(x,y,hitme){//collision_circle(x,y,6,hitme,0,1){
- var targ = collision_circle(x,y,6,hitme,0,1);
- if instance_exists(targ) && targ.team != team{
- if skill_get(16) = 1 && targ.my_health - dmg <= 0{
- queuedestroy = 0;
- if instance_exists(enemy){
- var nearestEnemy = instance_nearest(x,y,enemy);
- //direction = point_direction(x,y,nearestEnemy.x,nearestEnemy.y);
- speed = 10;
- sound_play(sndExplosion)//sndRecGlandProc);
- recycled = 1;
- }
- }else queuedestroy = 1;
- with(targ){
- my_health -= other.dmg;
- sprite_index = spr_hurt;
- image_index = 0;
- sound_play(snd_hurt);
- }
- }
- }
- if ((skill_get(19) && distance_to_object(enemy) < 56) || recycled = 1) && instance_exists(enemy){
- var aimDir = point_direction(x,y,nearestEnemy.x,nearestEnemy.y);
- var diff = cycle(aimDir - direction, -180, 180);
- if (abs(diff) < 2){
- direction = aimDir;
- }else{
- direction += diff * (0.20 + (0.10*recycled));
- }
- }
- if skill_get(21){
- if distance_to_object(enemy) < 32{
- var oldx = x;
- var oldy = y;
- move_snap(nearestEnemy.x,nearestEnemy.y);
- for(i=1;i<=10;i++){
- instance_create(x - (x - oldx) / i,y - (y - oldy)/i,DiscTrail);
- if skill_get(17) with(instance_create(x - (x - oldx) / i,y - (y - oldy)/i,PortalL)) image_blend = c_aqua;
- }
- }
- }
- if queuedestroy = 1{
- if skill_get(17) = 1{
- {
- with(instance_create(x,y,Lightning)){
- ammo = 1 + random(2);
- direction = random(360);
- alarm0 = 1;
- dmg = 1;
- damage = 1;
- team = other.team;
- }
- }
- }
- instance_destroy();
- }
- }
- #define bullet_draw
- if distance_to_object(Player) < 200{
- draw_set_alpha(0.1);
- draw_set_color(col1);
- draw_circle(x,y,10,0);
- draw_set_color(col2);
- draw_circle(x,y,9,0);
- draw_set_color(col3);
- draw_circle(x+lengthdir_x(2,direction),y+lengthdir_y(2,direction),9,0);
- draw_set_color(col4);
- draw_circle(x+lengthdir_x(2,direction),y+lengthdir_y(2,direction),8,0);
- draw_set_alpha(1);
- draw_set_color(col1);
- draw_circle(x,y,6,0);
- draw_set_color(col2);
- draw_circle(x,y,5,0);
- draw_set_color(col3);
- draw_circle(x+lengthdir_x(2,direction),y+lengthdir_y(2,direction),5,0);
- draw_set_color(col4);
- draw_circle(x+lengthdir_x(2,direction),y+lengthdir_y(2,direction),4,0);
- }else exit;
- #define bullet_destroy
- //derp
- #define create
- if global.Ultra[2] = 1{
- dmg_bash_base = 12;
- }else{
- dmg_bash_base = 4;
- }
- bandit_reloadTime = 0;
- bandit_burstRepeat = 0;
- bandit_rushTime = 0;
- bandit_rushSpd = 0;
- bandit_time = 0;
- if global.holiday = 0{
- spr_idle = sprBanditIdle;
- spr_walk = sprBanditWalk;
- spr_hurt = sprBanditHurt;
- spr_dead = sprBanditDead;
- }else if global.holiday = 1{
- spr_idle = sprSpookyBanditIdle;
- spr_walk = sprSpookyBanditWalk;
- spr_hurt = sprSpookyBanditHurt;
- spr_dead = sprSpookyBanditDead;
- }else{
- spr_idle = sprSnowBanditIdle;
- spr_walk = sprSnowBanditWalk;
- spr_hurt = sprSnowBanditHurt;
- spr_dead = sprSnowBanditDead;
- }
- snd_hurt = sndBanditHit;
- snd_dead = sndBanditDie;
- snd_lowh = sndBanditHit;
- snd_lowa = sndBanditHit;
- snd_wrld = sndSkillPick;
- snd_cptn = sndSkillPick;
- snd_thrn = sndSkillPick;
- snd_valt = sndSkillPick;
- snd_wrld = sndSkillPick;
- snd_chst = sndSkillPick;
- snd_spch = sndSkillPick;
- snd_idpd = sndSkillPick;
- maxhealth = 4;
- healthlock = maxhealth;
- #define scrBanditFire
- var obj;
- var dir = point_direction(x,y,mouse_x[index],mouse_y[index]) + sin(bandit_time);
- ID = obj_create(x,y);
- ID.direction = dir;
- ID.speed = 6;
- ID.team = team;
- ID.dmg = 3 + (GameCont.level * 0.50) - 0.50;
- ID.mask_index = sprEnemyBullet1
- wkick = 8;
- if bandit_burstRepeat > 0{
- bandit_reloadTime = 5
- }else{
- bandit_reloadTime = 15;
- }
- if skill_get(22) = 1{
- bandit_reloadTime = max((bandit_reloadTime * ((my_health * 100)/maxhealth)/100),4);
- }
- sound_play(sndEnemyFire)
- #define cycle
- /// cycle(value, min, max)
- /// Thanks yal
- var result, delta;
- delta = (argument2 - argument1);
- result = (argument0 - argument1) mod delta;
- if (result < 0) result += delta;
- return result + argument1;
- #define game_start
- global.Ultra[1] = 0;
- global.Ultra[2] = 0;
- #define step
- if button_pressed(index,"horn"){
- for(i=14;i<=23;i++){
- skill_set(i,1);
- }
- global.Ultra[2] = 2;
- GameCont.level = 10;
- }
- if skill_get(23) = 1{
- with(enemy){
- if my_health <= 1{
- other.bandit_reloadTime *= 0.50;
- instance_destroy();
- }
- }
- }
- if skill_get(17) = 1 && random(10) < 1{
- with(instance_create(x+sprite_get_width(sprite_index)/2-random(sprite_get_width(sprite_index)),y+sprite_get_height(sprite_index)/2-random(sprite_get_height(sprite_index)),PortalL)){
- depth = other.depth + choose(1,-1);
- image_blend = c_aqua;
- }
- }
- /// Local replacement for current_time
- bandit_time++;
- if bandit_time > 360 bandit_time = 0;
- if bandit_rushTime > 0 bandit_rushTime--;
- // Max level cap. Increased with more players.
- if GameCont.level > 5 + instance_number(Player) && GameCont.level < 10{//1P: 7, 2P: 8
- GameCont.level = 10;
- GameCont.endpoints = 1;
- }
- /// Assumed to have restarted your run, resets stats
- /// Temporary fix until yal fixes this
- if my_health > healthlock{
- if bandit_rushTime <= 0{
- healthlock = my_health;
- }else{
- my_health = healthlock;
- }
- }
- /// One curse, on the house ;)
- if GameCont.crown = 11
- curse = 1;
- if (curse = 1){
- if random(10)<3{
- var width = sprite_get_width(sprite_index)/2;
- var height = sprite_get_height(sprite_index)/3;
- with(instance_create(x+width-random(width*2),y+height-random(height*2),Curse)){
- depth = choose(3,-3,-3)
- }
- }
- }
- if bandit_reloadTime > 0 bandit_reloadTime--;
- //Firing
- if button_check(index,"fire") && bandit_reloadTime <= 0{
- bandit_burstRepeat = 0 + (skill_get(5) * 2) + global.Ultra[2];
- scrBanditFire();
- }
- if bandit_burstRepeat > 0 && bandit_reloadTime <= 1{
- bandit_burstRepeat--;
- scrBanditFire();
- }
- //Special
- if button_pressed(index,"spec") && bandit_rushTime <= 0{
- bandit_rushTime = 25;
- }
- if (bandit_rushTime > 0){
- sprite_index = spr_walk;
- var ratio = ((bandit_rushTime * 100)/25)/175;
- image_blend = make_color_rgb(255,255*ratio,255*ratio);
- if bandit_rushTime < 15{
- speed = bandit_rushSpd + (skill_get(14) * 2);
- if skill_get(14) = 1 && bandit_rushTime < 12{
- with(instance_create(x,y,Flame)){
- team = other.team;
- }
- }
- if collision_circle(x+lengthdir_x(8,direction),y+lengthdir_y(8,direction),4,Wall,0,1) && bandit_rushSpd > 3{
- with(collision_circle(x+lengthdir_x(8,direction),y+lengthdir_y(8,direction),4,Wall,0,1)){
- if global.Ultra[2] = 0{
- with(other){
- direction += 180 - 15 + random(30);
- bandit_rushSpd = 3;
- }
- }
- instance_create(x,y,FloorExplo);
- instance_destroy();
- }
- }
- if collision_circle(x,y,16,hitme,0,1){
- with(collision_circle(x,y,16,hitme,0,1)){
- if (team != other.team && (sprite_index != spr_hurt || (sprite_index = spr_hurt && image_index > 1))){
- my_health -= other.dmg_bash_base + floor(GameCont.level * 0.5);
- sprite_index = spr_hurt;
- image_index = 0;
- }
- }
- }
- }else if bandit_rushTime > 15{
- speed *= 0.50;
- }else{
- direction = point_direction(x,y,mouse_x[index],mouse_y[index]);
- bandit_rushSpd = 6;
- }
- }else{
- image_blend = c_white;
- }
- if bandit_rushTime > 15{
- healthlock = my_health;
- }else{
- if bandit_rushTime > 0 my_health = healthlock;
- }
- //Discards weapon
- if (wep != "#0"){//weapon_get_name(0)
- with(instance_create(x,y,ThrownWep)){
- wep = other.wep//weapon_get_name(other.wep);
- team = other.team;
- direction = point_direction(x,y,mouse_x[other.index],mouse_y[other.index]);
- speed = 6;
- team = other.team;
- sprite_index = weapon_get_sprite(other.wep)
- other.wep = "#0"//weapon_get_name(0);
- }
- }
- #define draw
- with(PlayerSit) visible = 0;
- with(SitDown) visible = 0;
- if instance_exists(PlayerSit) sprite_index = spr_idle;
- if back = 1
- draw_sprite_ext(sprBanditGun,0,x-lengthdir_x(wkick,aimDirection),y-lengthdir_y(wkick,aimDirection),1,right,aimDirection,image_blend,1)
- draw_sprite_ext(sprite_index,-1,x,y,right,1,angle,image_blend,1)
- if back = -1
- draw_sprite_ext(sprBanditGun,0,x-lengthdir_x(wkick,aimDirection),y-lengthdir_y(wkick,aimDirection),1,right,aimDirection,image_blend,1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement