Skip to content

Commit 5ae275f

Browse files
Merge pull request #82698 from Standing-Storm/rust-monster
[Magiclysm] Add the rust monster
1 parent 42dfdd2 commit 5ae275f

File tree

6 files changed

+278
-3
lines changed

6 files changed

+278
-3
lines changed

data/mods/Magiclysm/Spells/monsterspells.json

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -736,5 +736,110 @@
736736
{ "math": [ "u_calories('dont_affect_weariness': true) += _attack_value" ] }
737737
],
738738
"false_effect": [ { "u_add_effect": "effect_will_o_wisp_draining_monsters", "duration": [ 7200, 360000 ] } ]
739+
},
740+
{
741+
"id": "rust_monster_detect_metal_spell",
742+
"type": "SPELL",
743+
"name": { "str": "rust monster detect metal", "//~": "NO_I18N" },
744+
"description": { "str": "Rust monster detecting metal. It's a bug if you have it.", "//~": "NO_I18N" },
745+
"valid_targets": [ "ally", "hostile", "self" ],
746+
"message": "",
747+
"flags": [ "NO_PROJECTILE", "NO_EXPLOSION_SFX", "IGNORE_WALLS" ],
748+
"effect": "effect_on_condition",
749+
"effect_str": "EOC_RUST_MONSTER_DETECT_METAL",
750+
"shape": "blast",
751+
"min_aoe": 5,
752+
"max_aoe": 5
753+
},
754+
{
755+
"type": "effect_on_condition",
756+
"id": "EOC_RUST_MONSTER_DETECT_METAL",
757+
"condition": "u_is_character",
758+
"effect": [
759+
{ "npc_location_variable": { "context_val": "loc" } },
760+
{
761+
"u_run_inv_eocs": "random",
762+
"search_data": [
763+
{ "material": "iron", "worn_only": true },
764+
{ "material": "steel", "worn_only": true },
765+
{ "material": "lc_steel", "worn_only": true },
766+
{ "material": "mc_steel", "worn_only": true },
767+
{ "material": "hc_steel", "worn_only": true },
768+
{ "material": "ch_steel", "worn_only": true },
769+
{ "material": "qt_steel_", "worn_only": true },
770+
{ "material": "lc_steel_chain", "worn_only": true },
771+
{ "material": "mc_steel_chain", "worn_only": true },
772+
{ "material": "hc_steel_chain", "worn_only": true },
773+
{ "material": "ch_steel_chain", "worn_only": true },
774+
{ "material": "qt_steel_chain", "worn_only": true },
775+
{ "material": "iron", "wielded_only": true },
776+
{ "material": "steel", "wielded_only": true },
777+
{ "material": "lc_steel", "wielded_only": true },
778+
{ "material": "mc_steel", "wielded_only": true },
779+
{ "material": "hc_steel", "wielded_only": true },
780+
{ "material": "ch_steel", "wielded_only": true },
781+
{ "material": "qt_steel", "wielded_only": true },
782+
{ "material": "lc_steel_chain", "wielded_only": true },
783+
{ "material": "mc_steel_chain", "wielded_only": true },
784+
{ "material": "hc_steel_chain", "wielded_only": true },
785+
{ "material": "ch_steel_chain", "wielded_only": true },
786+
{ "material": "qt_steel_chain", "wielded_only": true }
787+
],
788+
"true_eocs": [
789+
{
790+
"id": "EOC_RUST_MONSTER_DETECT_METAL_TRUE",
791+
"//": "What an awful hack",
792+
"effect": [
793+
{ "u_cast_spell": { "id": "rust_monster_polymorph_to_hostile" }, "loc": { "context_val": "loc" } },
794+
{ "u_cast_spell": { "id": "rust_monster_increase_aggression" }, "loc": { "context_val": "loc" } }
795+
]
796+
}
797+
]
798+
}
799+
]
800+
},
801+
{
802+
"id": "rust_monster_polymorph_to_hostile",
803+
"type": "SPELL",
804+
"name": { "str": "[Ψ]Rust monster polymorph", "//~": "NO_I18N" },
805+
"description": { "str": "Rust monster polymorphing to hostile. It's a bug if you have it.", "//~": "NO_I18N" },
806+
"message": "",
807+
"valid_targets": [ "self", "hostile", "ally" ],
808+
"flags": [ "SILENT", "NO_EXPLOSION_SFX" ],
809+
"difficulty": 8,
810+
"max_level": 30,
811+
"effect": "targeted_polymorph",
812+
"effect_str": "mon_rust_monster_aggressive",
813+
"shape": "blast",
814+
"min_damage": 500,
815+
"max_damage": 500,
816+
"min_range": 10,
817+
"max_range": 10,
818+
"targeted_monster_ids": [ "mon_rust_monster" ]
819+
},
820+
{
821+
"id": "rust_monster_increase_aggression",
822+
"type": "SPELL",
823+
"name": { "str": "[Ψ]Rust monster increase aggression", "//~": "NO_I18N" },
824+
"description": {
825+
"str": "Makes a hostile rust monster hostile again if you come back with more metal. It's a bug if you have it.",
826+
"//~": "NO_I18N"
827+
},
828+
"message": "",
829+
"valid_targets": [ "self", "hostile", "ally" ],
830+
"flags": [ "SILENT", "NO_EXPLOSION_SFX" ],
831+
"difficulty": 8,
832+
"max_level": 30,
833+
"effect": "effect_on_condition",
834+
"effect_str": "EOC_RUST_MONSTER_INCREASE_AGGRESSION",
835+
"shape": "blast",
836+
"min_range": 10,
837+
"max_range": 10,
838+
"targeted_monster_ids": [ "mon_rust_monster" ]
839+
},
840+
{
841+
"type": "effect_on_condition",
842+
"id": "EOC_RUST_MONSTER_INCREASE_AGGRESSION",
843+
"effect": [ { "math": [ "u_val('anger')", "=", "50" ] } ]
739844
}
740845
]

data/mods/Magiclysm/monster_factions.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,17 @@
6565
"type": "MONSTER_FACTION",
6666
"name": "elves"
6767
},
68+
{
69+
"type": "MONSTER_FACTION",
70+
"name": "rust_monster",
71+
"hate": [ "iron_golem" ]
72+
},
73+
{
74+
"type": "MONSTER_FACTION",
75+
"name": "iron_golem",
76+
"base_faction": "robot",
77+
"by_mood": [ "rust_monster" ]
78+
},
6879
{
6980
"type": "MONSTER_FACTION",
7081
"name": "earth_spirit_faction",

data/mods/Magiclysm/monstergroups.json

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@
131131
{ "monster": "mon_shrieker", "weight": 10 },
132132
{ "monster": "mon_lemure", "weight": 5, "cost_multiplier": 2, "pack_size": [ 1, 4 ] },
133133
{ "monster": "mon_troll_stone", "weight": 3, "cost_multiplier": 10, "conditions": [ "DAY" ] },
134+
{ "monster": "mon_rust_monster", "weight": 5 },
134135
{
135136
"monster": "mon_owlbear_zombie",
136137
"weight": 40,
@@ -225,7 +226,17 @@
225226
{
226227
"type": "monstergroup",
227228
"id": "GROUP_SEWER",
228-
"monsters": [ { "monster": "mon_otyugh", "weight": 15 } ]
229+
"monsters": [ { "monster": "mon_otyugh", "weight": 15 }, { "monster": "mon_rust_monster", "weight": 20 } ]
230+
},
231+
{
232+
"type": "monstergroup",
233+
"id": "GROUP_SUBWAY",
234+
"monsters": [ { "monster": "mon_rust_monster", "weight": 35 } ]
235+
},
236+
{
237+
"type": "monstergroup",
238+
"id": "GROUP_SUBWAY_CITY",
239+
"monsters": [ { "monster": "mon_rust_monster", "weight": 35 } ]
229240
},
230241
{
231242
"type": "monstergroup",

data/mods/Magiclysm/monsters/golems.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@
8888
"type": "MONSTER",
8989
"name": "iron golem",
9090
"description": "A large, humanoid golem made from iron. Some sort of noxious gas seems to be seeping from its mouth.",
91-
"default_faction": "robot",
91+
"default_faction": "iron_golem",
9292
"bodytype": "human",
93-
"species": [ "GOLEM" ],
93+
"species": [ "GOLEM", "IRON_GOLEM" ],
9494
"volume": "120 L",
9595
"weight": "945 kg",
9696
"hp": 400,

data/mods/Magiclysm/monsters/monsters.json

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -959,5 +959,147 @@
959959
"flags": [ "SEES", "HEARS", "SMELLS", "KEENNOSE", "REVIVES", "PATH_AVOID_DANGER", "PATH_AVOID_FIRE", "WARM" ],
960960
"zombify_into": "mon_catoblepas_zombie",
961961
"armor": { "bash": 4, "cut": 2, "necrotic": 25, "poison": 30 }
962+
},
963+
{
964+
"id": "mon_rust_monster",
965+
"type": "MONSTER",
966+
"name": { "str": "rust monster" },
967+
"description": "A strange creature, like a cross between a crustacean and an armadillo, with a long tail that ends in a paddle-like club. It walks on four insectile legs, occasionally stopping and seeming to sniff the air. Two long, feather-like antennae extend from either side of its mouth.",
968+
"default_faction": "magical_beast",
969+
"bodytype": "dog",
970+
"species": [ "MAGICAL_BEAST" ],
971+
"volume": "55 L",
972+
"weight": "65 kg",
973+
"hp": 65,
974+
"speed": 140,
975+
"material": [ "flesh" ],
976+
"symbol": "R",
977+
"color": "light_red",
978+
"aggression": -10,
979+
"morale": 70,
980+
"melee_skill": 4,
981+
"melee_dice": 1,
982+
"melee_dice_sides": 6,
983+
"melee_damage": [ { "damage_type": "cut", "amount": 1 } ],
984+
"dodge": 3,
985+
"vision_night": 15,
986+
"harvest": "mammal_fur",
987+
"path_settings": { "max_dist": 10 },
988+
"special_attacks": [
989+
{
990+
"id": "rust_monster_detect_metal",
991+
"type": "spell",
992+
"spell_data": { "id": "rust_monster_detect_metal_spell", "hit_self": true },
993+
"cooldown": { "math": [ "3" ] },
994+
"allow_no_target": true,
995+
"monster_message": "The rust monster's feelers twitch."
996+
},
997+
{
998+
"type": "monster_attack",
999+
"attack_type": "melee",
1000+
"id": "rust_monster_kill_iron_golem",
1001+
"accuracy": 6,
1002+
"damage_max_instance": [ { "damage_type": "bash", "amount": 9999 } ],
1003+
"cooldown": 4,
1004+
"move_cost": 100,
1005+
"blockable": false,
1006+
"condition": { "npc_has_species": "IRON_GOLEM" },
1007+
"hit_dmg_u": "",
1008+
"hit_dmg_npc": "%1$s antennae touch <npcname>",
1009+
"miss_msg_u": "",
1010+
"miss_msg_npc": "%1$s antennae bend toward <npcname>, but they dodge!",
1011+
"no_dmg_msg_u": "",
1012+
"no_dmg_msg_npc": "%1$s antennae touch <npcname>"
1013+
}
1014+
],
1015+
"anger_triggers": [ "HURT" ],
1016+
"flags": [ "SEES", "HEARS", "SMELLS", "ANIMAL", "PATH_AVOID_DANGER", "WARM" ],
1017+
"armor": { "bash": 3, "cut": 5, "stab": 6 }
1018+
},
1019+
{
1020+
"id": "mon_rust_monster_aggressive",
1021+
"copy-from": "mon_rust_monster",
1022+
"type": "MONSTER",
1023+
"name": { "str": "rust monster" },
1024+
"aggression": 50,
1025+
"aggro_character": true,
1026+
"special_attacks": [
1027+
{
1028+
"type": "monster_attack",
1029+
"attack_type": "melee",
1030+
"id": "rust_monster_kill_iron_golem",
1031+
"accuracy": 6,
1032+
"damage_max_instance": [ { "damage_type": "bash", "amount": 9999 } ],
1033+
"cooldown": 4,
1034+
"move_cost": 100,
1035+
"blockable": false,
1036+
"condition": { "npc_has_species": "IRON_GOLEM" },
1037+
"hit_dmg_u": "",
1038+
"hit_dmg_npc": "%1$s antennae touch <npcname>",
1039+
"miss_msg_u": "",
1040+
"miss_msg_npc": "%1$s antennae bend toward <npcname>, but they dodge!",
1041+
"no_dmg_msg_u": "",
1042+
"no_dmg_msg_npc": "%1$s antennae touch <npcname>"
1043+
},
1044+
{
1045+
"type": "monster_attack",
1046+
"attack_type": "melee",
1047+
"id": "rest_monster_rusting",
1048+
"accuracy": 6,
1049+
"damage_max_instance": [ { "damage_type": "bash", "amount": 0 } ],
1050+
"eoc": [ "EOC_RUST_MONSTER_RUSTING" ],
1051+
"cooldown": 4,
1052+
"move_cost": 100,
1053+
"blockable": false,
1054+
"hit_dmg_u": "%1$s's antennae touch you!",
1055+
"hit_dmg_npc": "%1$s antennae touch <npcname>",
1056+
"miss_msg_u": "%1$s antennae bend toward you, but you dodge!",
1057+
"miss_msg_npc": "%1$s antennae bend toward <npcname>, but they dodge!",
1058+
"no_dmg_msg_u": "%1$s's antennae touch you!",
1059+
"no_dmg_msg_npc": "%1$s antennae touch <npcname>"
1060+
}
1061+
]
1062+
},
1063+
{
1064+
"type": "effect_on_condition",
1065+
"id": "EOC_RUST_MONSTER_RUSTING",
1066+
"effect": [
1067+
{
1068+
"npc_run_inv_eocs": "random",
1069+
"search_data": [
1070+
{ "material": "iron", "worn_only": true },
1071+
{ "material": "steel", "worn_only": true },
1072+
{ "material": "lc_steel", "worn_only": true },
1073+
{ "material": "mc_steel", "worn_only": true },
1074+
{ "material": "hc_steel", "worn_only": true },
1075+
{ "material": "ch_steel", "worn_only": true },
1076+
{ "material": "qt_steel_", "worn_only": true },
1077+
{ "material": "lc_steel_chain", "worn_only": true },
1078+
{ "material": "mc_steel_chain", "worn_only": true },
1079+
{ "material": "hc_steel_chain", "worn_only": true },
1080+
{ "material": "ch_steel_chain", "worn_only": true },
1081+
{ "material": "qt_steel_chain", "worn_only": true },
1082+
{ "material": "iron", "wielded_only": true },
1083+
{ "material": "steel", "wielded_only": true },
1084+
{ "material": "lc_steel", "wielded_only": true },
1085+
{ "material": "mc_steel", "wielded_only": true },
1086+
{ "material": "hc_steel", "wielded_only": true },
1087+
{ "material": "ch_steel", "wielded_only": true },
1088+
{ "material": "qt_steel", "wielded_only": true },
1089+
{ "material": "lc_steel_chain", "wielded_only": true },
1090+
{ "material": "mc_steel_chain", "wielded_only": true },
1091+
{ "material": "hc_steel_chain", "wielded_only": true },
1092+
{ "material": "ch_steel_chain", "wielded_only": true },
1093+
{ "material": "qt_steel_chain", "wielded_only": true }
1094+
],
1095+
"true_eocs": [
1096+
{
1097+
"id": "EOC_RUST_MONSTER_RUSTING_TRUE",
1098+
"effect": [ { "message": "Your <npc_name> rusts away to dust!", "type": "bad" }, "npc_die" ]
1099+
}
1100+
],
1101+
"false_eocs": [ { "id": "EOC_RUST_MONSTER_RUSTING_FALSE", "effect": [ { "math": [ "u_val('anger')", "=", "0" ] } ] } ]
1102+
}
1103+
]
9621104
}
9631105
]

data/mods/Magiclysm/species.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@
5959
"description": "an automaton, animated by magical forces",
6060
"anger_triggers": [ "HURT", "PLAYER_CLOSE" ]
6161
},
62+
{
63+
"type": "SPECIES",
64+
"id": "IRON_GOLEM",
65+
"description": "an iron golem, hated by rust monsters",
66+
"anger_triggers": [ "HURT", "PLAYER_CLOSE" ]
67+
},
6268
{
6369
"type": "SPECIES",
6470
"id": "OGRE",

0 commit comments

Comments
 (0)