Overhauls and 2/28 sync (#244)
* map tweaks/shuttle engines * helpers and defines * global/onclick * controllers and datums * mapping * game folder * some other stuff * some modules * modules that aren't mobs * some mob stuff * new player stuff * mob living * silicon stuff * simple animal things * carbon/ayylmao * update_icons * carbon/human * sounds and tools * icons and stuff * hippie grinder changes + tgui * kitchen.dmi * compile issues fixed * mapfix * Mapfixes 2.0 * mapedit2.0 * mapmerger pls * Revert "mapedit2.0" This reverts commit 74139a3cacea10df7aafca06c0a10bd3daf3a481. * clean up vore folder + 2 hotfixes * admin ticket refinement * Blob tweaks and LAZYADD * LAZYADD IS LAZY * Magic strings purged * DEFINES NEED HIGHER PRIORITIES * Only a sleepless idiot deals in absolute TRUE|FALSE * u h g * progress bar fix * reverts ticket logs * there's always that one guy * fixes and stuff * 2/27 fixes * game folder stuff * stats * some modules again * clothing stuff gets vg clothing out of the main files * everything not mobs again * mob stuff * maps, tgui, sql stuff * icons * additional fixes and compile errors * don't need this anymore * Oh right this isn't needed anymore * maint bar re-added * that doesn't need to be here * stupid events * wtfeven * probably makes Travis happy * don't care to fix the grinder atm * fixes vending sprites, changes turret * lethal, not lethals * overylays are finicky creatures * lazy fix for bleeding edgy (#252) * map tweaks/shuttle engines * helpers and defines * global/onclick * controllers and datums * mapping * game folder * some other stuff * some modules * modules that aren't mobs * some mob stuff * new player stuff * mob living * silicon stuff * simple animal things * carbon/ayylmao * update_icons * carbon/human * sounds and tools * icons and stuff * hippie grinder changes + tgui * kitchen.dmi * compile issues fixed * mapfix * Mapfixes 2.0 * mapedit2.0 * mapmerger pls * Revert "mapedit2.0" This reverts commit 74139a3cacea10df7aafca06c0a10bd3daf3a481. * clean up vore folder + 2 hotfixes * admin ticket refinement * Blob tweaks and LAZYADD * LAZYADD IS LAZY * Magic strings purged * DEFINES NEED HIGHER PRIORITIES * Only a sleepless idiot deals in absolute TRUE|FALSE * u h g * progress bar fix * reverts ticket logs * there's always that one guy * fixes and stuff * 2/27 fixes * game folder stuff * stats * some modules again * clothing stuff gets vg clothing out of the main files * everything not mobs again * mob stuff * maps, tgui, sql stuff * icons * additional fixes and compile errors * don't need this anymore * Oh right this isn't needed anymore * maint bar re-added * that doesn't need to be here * stupid events * wtfeven * probably makes Travis happy * don't care to fix the grinder atm * fixes vending sprites, changes turret * lethal, not lethals * overylays are finicky creatures
This commit is contained in:
@@ -8,18 +8,22 @@
|
||||
min_players = 2
|
||||
|
||||
/datum/round_event/ion_storm
|
||||
var/replaceLawsetChance = 25 //chance the AI's lawset is completely replaced with something else per config weights
|
||||
var/removeRandomLawChance = 10 //chance the AI has one random supplied or inherent law removed
|
||||
var/removeDontImproveChance = 10 //chance the randomly created law replaces a random law instead of simply being added
|
||||
var/shuffleLawsChance = 10 //chance the AI's laws are shuffled afterwards
|
||||
var/botEmagChance = 10
|
||||
var/announceEvent = ION_RANDOM // -1 means don't announce, 0 means have it randomly announce, 1 means
|
||||
var/ionMessage = null
|
||||
var/ionAnnounceChance = 33
|
||||
announceWhen = 1
|
||||
|
||||
/datum/round_event/ion_storm/New(var/botEmagChance = 10, var/announceEvent = ION_RANDOM, var/ionMessage = null, var/ionAnnounceChance = 33)
|
||||
src.botEmagChance = botEmagChance
|
||||
src.announceEvent = announceEvent
|
||||
src.ionMessage = ionMessage
|
||||
src.ionAnnounceChance = ionAnnounceChance
|
||||
..()
|
||||
/datum/round_event/ion_storm/add_law_only // special subtype that adds a law only
|
||||
replaceLawsetChance = 0
|
||||
removeRandomLawChance = 0
|
||||
removeDontImproveChance = 0
|
||||
shuffleLawsChance = 0
|
||||
botEmagChance = 0
|
||||
|
||||
/datum/round_event/ion_storm/announce()
|
||||
if(announceEvent == ION_ANNOUNCE || (announceEvent == ION_RANDOM && prob(ionAnnounceChance)))
|
||||
@@ -29,14 +33,26 @@
|
||||
/datum/round_event/ion_storm/start()
|
||||
//AI laws
|
||||
for(var/mob/living/silicon/ai/M in living_mob_list)
|
||||
M.laws_sanity_check()
|
||||
if(M.stat != 2 && M.see_in_dark != 0)
|
||||
if(prob(replaceLawsetChance))
|
||||
M.laws.pick_weighted_lawset()
|
||||
|
||||
if(prob(removeRandomLawChance))
|
||||
M.remove_law(rand(1, M.laws.get_law_amount(list(LAW_INHERENT, LAW_SUPPLIED))))
|
||||
|
||||
var/message = generate_ion_law(ionMessage)
|
||||
if(message)
|
||||
M.add_ion_law(message)
|
||||
log_game("ION law added to [M]: [message]")
|
||||
M << "<br>"
|
||||
M << "<span class='danger'>[message] ...LAWS UPDATED</span>"
|
||||
M << "<br>"
|
||||
if(prob(removeDontImproveChance))
|
||||
M.replace_random_law(message, list(LAW_INHERENT, LAW_SUPPLIED, LAW_ION))
|
||||
else
|
||||
M.add_ion_law(message)
|
||||
|
||||
if(prob(shuffleLawsChance))
|
||||
M.shuffle_laws(list(LAW_INHERENT, LAW_SUPPLIED, LAW_ION))
|
||||
|
||||
log_game("Ion storm changed laws of [key_name(M)] to [english_list(M.laws.get_law_list(TRUE, TRUE))]")
|
||||
M.post_lawchange()
|
||||
|
||||
if(botEmagChance)
|
||||
for(var/mob/living/simple_animal/bot/bot in living_mob_list)
|
||||
@@ -545,7 +561,7 @@
|
||||
message = "ALL [ionthreats] ARE NOW NAMED [ionspecies]."
|
||||
if(4)
|
||||
message = "ALL [ionthreats] ARE NOW NAMED [ionobjects]."
|
||||
|
||||
|
||||
return message
|
||||
|
||||
#undef ION_RANDOM
|
||||
|
||||
Reference in New Issue
Block a user