mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-10 09:42:29 +00:00
## About The Pull Request refactors leapers into basic mobs and adds a new ability for wizards. for 2 points wizards can buy their own leaper pet. they will get a contract which lets them pick their pet's name and color  after they sign the contract they will get a frog statue which is used to contain the leaper. players can use this statue to release or recall the leaper into the statue. when its in the statue it will slowly regain health or even revive from the dead, but if it gets gibbed then the statue will be useless. also adds a new ai behavior for leapers which lets them go swim in water (and splash around) for a period of time. i gave this behavior to frogs and crabs too when riding the leaper, the players will get access to all its abilities, it now has new abilities, it can create frog minions that suicide bomb the enemies and it can also create a shower of poisonous structures. https://github.com/tgstation/tgstation/assets/138636438/931aa7b4-09f0-493f-bdb6-f3bdd0915b22 also when riding the leaper, players can point at walls near it so it will destroy it. alternatively players can give commands to their leapers to use abilities and to follow them if they are not riding it. wizards cant be force dismounted from their frogs, and only wizards can ride the frogs. this also removes leapers from cytology as they now are much more dangerous and have a new home ## Why It's Good For The Game refactors leapers into basic mobs, and gives more gameplay opportunities for wizards ## Changelog 🆑 refactor: leapers have been refactored into basic mobs please report any bugs add: wizards can now summon a leaper pet removal: removes leapers from cytology /🆑
41 lines
1.2 KiB
Plaintext
41 lines
1.2 KiB
Plaintext
/**
|
|
* Bombs the user after an attack
|
|
*/
|
|
/datum/component/explode_on_attack
|
|
/// range of bomb impact
|
|
var/impact_range
|
|
/// should we be destroyed after the explosion?
|
|
var/destroy_on_explode
|
|
/// list of mobs we wont bomb on attack
|
|
var/list/mob_type_dont_bomb
|
|
|
|
/datum/component/explode_on_attack/Initialize(impact_range = 1, destroy_on_explode = TRUE, list/mob_type_dont_bomb = list())
|
|
if(!isliving(parent))
|
|
return COMPONENT_INCOMPATIBLE
|
|
src.impact_range = impact_range
|
|
src.destroy_on_explode = destroy_on_explode
|
|
src.mob_type_dont_bomb = mob_type_dont_bomb
|
|
|
|
/datum/component/explode_on_attack/RegisterWithParent()
|
|
RegisterSignal(parent, COMSIG_HOSTILE_PRE_ATTACKINGTARGET, PROC_REF(bomb_target))
|
|
|
|
/datum/component/explode_on_attack/UnregisterFromParent()
|
|
UnregisterSignal(parent, COMSIG_HOSTILE_PRE_ATTACKINGTARGET)
|
|
|
|
|
|
/datum/component/explode_on_attack/proc/bomb_target(mob/living/owner, atom/victim)
|
|
SIGNAL_HANDLER
|
|
|
|
if(!isliving(victim))
|
|
return
|
|
|
|
if(is_type_in_typecache(victim, mob_type_dont_bomb))
|
|
return
|
|
|
|
explosion(owner, light_impact_range = impact_range, explosion_cause = src)
|
|
|
|
if(destroy_on_explode && owner)
|
|
qdel(owner)
|
|
return COMPONENT_HOSTILE_NO_ATTACK
|
|
|