Skip to content

Commit

Permalink
can man nerf/rework part 2 + controversial changes
Browse files Browse the repository at this point in the history
  • Loading branch information
BurgerLUA committed Oct 12, 2024
1 parent 8c49534 commit ab89d69
Show file tree
Hide file tree
Showing 28 changed files with 239 additions and 49 deletions.
91 changes: 87 additions & 4 deletions code/_core/datum/ai/boss/can_man.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,58 @@
var/minigun_state = 0
var/strafe_latch = 0


//0 = normal
//1 = shooting
var/missile_state = 0
var/list/stored_missile_turfs = list()
var/missile_spam_left = 0

var/last_objective_attack

/ai/boss/can_man/Destroy()
. = ..()
last_objective_attack = null

/ai/boss/can_man/handle_attacking()

if(missile_state > 0)
return TRUE

if(minigun_state > 0)
if(objective_attack && minigun_state == 2)
owner_as_can_man.shoot_minigun(objective_attack)
if(objective_attack == last_objective_attack)
owner_as_can_man.shoot_minigun(objective_attack)
else
CALLBACK_REMOVE("\ref[src]_minigun_finish")
finish_minigun()
return TRUE
return TRUE

if(objective_attack && get_dist(owner,objective_attack) > 4 && prob(10))
var/target_distance = get_dist(owner,objective_attack)

if(target_distance > 3 && missile_spam_left > 0)
call_missiles()
missile_spam_left -= 1
return TRUE

if(prob(target_distance > 3 ? 50 : 5))
rev_minigun()
return TRUE

if(missile_spam_left <= 0 && !prob(80))
missile_spam_left = 5
return TRUE

. = ..()


/ai/boss/can_man/handle_movement()

//Missile attack.
if(missile_state > 0)
return TRUE

//Minigun attack.
if(owner_as_can_man && owner_as_can_man.health && minigun_state != 0)
var/health_percent = owner_as_can_man.health.health_current / owner_as_can_man.health.health_max
Expand All @@ -46,7 +81,7 @@
last_movement_proc = "canman_minigun"
return TRUE
if(health_percent >= 0.25)
//Stafe
//Strafe
if(!strafe_latch)
strafe_latch = pick(-90,90)
var/desired_dir = get_dir(owner,objective_attack)
Expand Down Expand Up @@ -91,6 +126,8 @@

owner_as_can_man.set_dir(get_dir(owner_as_can_man,T))

last_objective_attack = objective_attack

return TRUE

/ai/boss/can_man/proc/start_minigun()
Expand Down Expand Up @@ -135,4 +172,50 @@
minigun_state = 0
strafe_latch = 0x0

return TRUE
return TRUE

/ai/boss/can_man/proc/call_missiles()

if(missile_state != 0)
return

missile_state = 1

play_sound('sound/effects/terminal_alert.ogg',get_turf(owner_as_can_man))

for(var/i=1,i<=3,i++)
CALLBACK("\ref[src]_call_missile_[i]",10 + i*10,src,src::shoot_missile())

CALLBACK("\ref[src]_finish_missiles",30 + 3*10,src,src::finish_missiles())


/ai/boss/can_man/proc/finish_missiles()
missile_state = 0
stored_missile_turfs.Cut()
return TRUE


/ai/boss/can_man/proc/shoot_missile()

if(!owner_as_can_man || owner_as_can_man.dead || owner_as_can_man.qdeleting)
return

if(!objective_attack)
return

var/turf/T = get_turf(objective_attack)

if(!T)
return

if(T in stored_missile_turfs)
for(var/i=1,i<=5,i++)
var/turf/next_turf = locate(T.x + rand(-5,5),T.y + rand(-5,5) ,T.z)
if(next_turf)
T = next_turf
if(!(T in stored_missile_turfs))
break

stored_missile_turfs += T

owner_as_can_man.summon_missile(T)
31 changes: 22 additions & 9 deletions code/_core/datum/loot/faction_boss.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,33 @@
/obj/item/storage/blood_box/holy_grenades = 1,
/obj/item/weapon/ranged/magic/spellblade/runesword = 1,
/obj/item/container/syringe/medipen/adminomnizine = 1,
/obj/item/weapon/ranged/magic/staff/lavaland = 1
)

/loot/lavaland/contract
loot_table = list(
/obj/item/clothing/back/storage/backpack/bluespace = 1,
/obj/item/clothing/back/storage/satchel/bluespace = 1,
/obj/item/weapon/melee/energy/plightbringer = 1,
/obj/item/dice/d20/cursed = 1,
/obj/item/weapon/ranged/magic/staff/lavaland = 1,
/obj/item/weapon/ranged/spellgem/pillar = 1,
/obj/item/soulgem/azuras_star = 1
/obj/item/clothing/ring/horsemen/conquest = 1,
/obj/item/clothing/ring/horsemen/death = 1,
/obj/item/clothing/ring/horsemen/famine = 1,
/obj/item/clothing/ring/horsemen/war = 1,
/obj/item/soulgem/godly = 1
)

/loot/lavaland/ash_drake
loot_table = list(
/obj/item/clothing/overwear/armor/drake_armor = 3,
/obj/item/weapon/melee/energy/plightbringer = 1
/obj/item/clothing/back/wings/angel/demon = 1,
)

/loot/lavaland/bubblegum
loot_table = list(
/obj/item/clothing/overwear/hardsuit/ling = 3,
/obj/item/clothing/mask/endless_bubblegum = 1
/obj/item/storage/blood_box/auto_gauss = 1,
)

/loot/lavaland/colossus
Expand All @@ -44,7 +55,8 @@

/loot/lavaland/leaper
loot_table = list(
/obj/item/corrupting_frog = 3
/obj/item/corrupting_frog = 3,
/obj/item/soulgem/azuras_star = 1
)


Expand All @@ -63,16 +75,17 @@
/loot/lavaland/gabber
loot_table = list(
/obj/item/clothing/back/wings/angel = 3,
/obj/item/weapon/melee/staff_of_healing = 1,
/obj/item/weapon/ranged/spellgem/pillar = 0.1
/obj/item/weapon/melee/staff_of_healing = 1
)

/loot/lavaland/slime_king
loot_table = list(
/obj/item/clothing/back/storage/backpack/clown/bag_of_bombs = 3
/obj/item/clothing/back/storage/backpack/clown/bag_of_bombs = 3,
/obj/item/clothing/mask/endless_bubblegum = 1
)

/loot/lavaland/ai_core
loot_table = list(
/obj/item/weapon/ranged/energy/gatling = 3
/obj/item/weapon/ranged/energy/gatling = 1,
/obj/item/clothing/glasses/sun/augmented = 1
)
14 changes: 8 additions & 6 deletions code/_core/datum/loot/faction_syndicate.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,26 @@
/obj/item/supply_crate/syndicate = 1,
/loot/currency/telecrystals = 1,
/obj/item/storage/kit/syndicate/filled = 1,
/obj/item/attachment/barrel/charger/advanced = 1,
/obj/item/attachment/barrel/laser_charger/advanced = 1,
/obj/item/clothing/glasses/sun/gar = 1,
/obj/item/clothing/glasses/sun/gar/giga = 1,
/loot/currency/gold_bar = 1
)
loot_count = 1
chance_none = 33
allow_duplicates = FALSE

/loot/syndicate/vault/secure
loot_table = list(
/obj/item/clothing/back/storage/backpack/bluespace = 1,
/obj/item/clothing/back/storage/satchel/bluespace = 1,
/obj/item/powercell/bluespace = 1,
/obj/item/clothing/head/hat/pete = 1,
/obj/item/clothing/overwear/armor/seva/syndie = 1,
/obj/item/weapon/ranged/bow/hardlight = 1
/obj/item/attachment/barrel/charger/advanced = 1,
/obj/item/attachment/barrel/laser_charger/advanced = 1,
/obj/item/clothing/head/hat/pete = 1,
/obj/item/weapon/ranged/bullet/magazine/pistol/deagle/gold = 1
)
loot_count = 1
chance_none = 33
allow_duplicates = FALSE

/loot/syndicate/lunch
loot_table = list(
Expand Down
2 changes: 2 additions & 0 deletions code/_core/datum/loot/random.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@

for(var/k in get_base_types())
var/obj/item/I = k
if(initial(I.value) <= 0)
continue
var/value = SSbalance.stored_value[k]
if(!value || value <= 0)
continue
Expand Down
2 changes: 2 additions & 0 deletions code/_core/datum/loot/random_gun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
var/obj/item/weapon/ranged/R = k
if(company_type && initial(R.company_type) != src.company_type)
continue
if(initial(R.value) <= 0)
continue
var/initial_value = SSbalance.stored_value[k]
if(initial_value <= 0)
continue
Expand Down
1 change: 1 addition & 0 deletions code/_core/mob/living/life.dm
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
S.name = "soul of [initial(name)]:"
S.soul_size = src.soul_size
S.soul_path = src.type
S.boss = src.boss
INITIALIZE(S)
GENERATE(S)
FINALIZE(S)
Expand Down
6 changes: 5 additions & 1 deletion code/_core/mob/living/simple/can_man.dm
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,14 @@

object_size = 1

level = 90
level = 80

use_momentum = FALSE

/mob/living/simple/can_man/proc/summon_missile(var/turf/T)
new /obj/effect/falling_missile(T)
return TRUE

/mob/living/simple/can_man/proc/shoot_minigun(var/atom/target)

var/turf/T
Expand Down
58 changes: 57 additions & 1 deletion code/_core/obj/effect/meteor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
new/obj/effect/temp/target(loc,20)

/obj/effect/falling_meteor/proc/land()
explode(get_turf(src),2,src,src,multiplier = 5)
explode(get_turf(src),2,src)
src.alpha = 0
CALLBACK("delete_\ref[src]",SECONDS_TO_DECISECONDS(3),src,.datum/proc/delete)
return TRUE
Expand Down Expand Up @@ -63,4 +63,60 @@
explode(get_turf(src),2,src,src,desired_loyalty_tag=stored_loyalty_tag)
src.alpha = 0
CALLBACK("delete_\ref[src]",SECONDS_TO_DECISECONDS(3),src,.datum/proc/delete)
return TRUE


/obj/effect/falling_missile
name = "falling missile"
icon = 'icons/obj/effects/missile.dmi'
icon_state = "missile_flight"

plane = PLANE_ALWAYS_VISIBLE

var/lock_time = SECONDS_TO_DECISECONDS(2)
var/flight_time = SECONDS_TO_DECISECONDS(1)
var/explode_time = SECONDS_TO_DECISECONDS(1)

pixel_x = -16
pixel_y = 0

/obj/effect/falling_missile/New(var/desired_location)

alpha = 0
pixel_z = TILE_SIZE*VIEW_RANGE*2

new/obj/effect/temp/target(loc,lock_time + flight_time)

play_sound('sound/effects/double_beep.ogg',loc)

CALLBACK("missile_shoot_\ref[src]",lock_time,src,src::shoot())

return ..()

/obj/effect/falling_missile/proc/shoot()

animate(src, alpha=255, time=flight_time*0.5)
animate(src, pixel_z=0, pixel_w=0, time=flight_time, transform = get_base_transform())

CALLBACK("missile_land_\ref[src]",flight_time,src,src::land())
play_sound('sound/effects/mortar_long_whistle.ogg',loc)

return TRUE


/obj/effect/falling_missile/proc/land()
var/turf/T = get_turf(src)
src.alpha = 255
src.icon_state = "missile_landed"
play_sound('sound/effects/impacts/meteor_impact.ogg',T)
explode(T,2,src,src)
CALLBACK("missile_detonate_\ref[src]",explode_time,src,src::detonate())
return TRUE

/obj/effect/falling_missile/proc/detonate()
var/turf/T = get_turf(src)
firebomb(T,5,src,src)
explode(T,3,src,src)
CALLBACK("delete_\ref[src]",SECONDS_TO_DECISECONDS(3),src,.datum/proc/delete)
src.alpha = 0
return TRUE
1 change: 1 addition & 0 deletions code/_core/obj/effect/temp/soul.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

var/soul_size = 0
var/mob/living/soul_path
var/boss = FALSE

/obj/effect/temp/soul/Finalize()

Expand Down
2 changes: 1 addition & 1 deletion code/_core/obj/hud/inventory/secure.dm
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
return FALSE

if(I.contraband)
if(messages) owner.to_chat(span("warning","This type of object cannot be stored."))
if(messages) owner.to_chat(span("warning","Contraband cannot be stored inside this."))
return FALSE

. = ..()
6 changes: 4 additions & 2 deletions code/_core/obj/item/_item.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

var/value_burgerbux

var/contraband = FALSE //Set to true if this object is considered contraband and can't be saved, but still accessed by the game.
var/contraband = FALSE //Set to true if this object is considered contraband and can't be saved except on your character.
var/save_on_death = FALSE //Set to true if this item should save on death, regardless of item respawning. This should only be set by special code.
var/can_save_loadout = TRUE //Set to true if you can save this item in a loadout.

Expand Down Expand Up @@ -463,7 +463,9 @@
else if(tier == 0)
. += div("rarity center","Tier [tier][tier_type ? " [tier_type]" : ""].")

if(contraband)
if(!can_save)
. += div("bad bold center","CLASSIFIED")
else if(contraband)
. += div("bad bold center","CONTRABAND")

if(quality != -1)
Expand Down
4 changes: 2 additions & 2 deletions code/_core/obj/item/_item_data_saving.dm
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@

/obj/item/proc/save_item_data(var/mob/living/advanced/player/P,var/save_inventory = TRUE,var/died=FALSE,var/loadout=FALSE)

if( (contraband || !can_save) && !length(inventories)) //The inventory check prevents people from losing their stuff if a dev is dumb and adds a contraband item with storage.
if(contraband) P.to_chat(span("warning","Notice: \The [src.name] could not be saved because it is considered contraband."))
if(!can_save && !length(inventories))
P.to_chat(span("warning","Notice: \The [src.name] could not be saved."))
return null

if(loadout && !SSbalance.can_save_loadout[src.type])
Expand Down
Loading

0 comments on commit ab89d69

Please sign in to comment.