Skip to content

Commit c6606a0

Browse files
Merge pull request #82550 from Standing-Storm/invisible-stalker
[Magiclysm] Add Aerial Assassin monster and `PERMANENT_INVISIBILITY` flag to go with it
1 parent b85daaa commit c6606a0

File tree

10 files changed

+129
-9
lines changed

10 files changed

+129
-9
lines changed

data/json/monsters/monster_flags.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,11 @@
154154
"type": "monster_flag",
155155
"//": "Monster can see creatures even when they're invisible"
156156
},
157+
{
158+
"id": "PERMANENT_INVISIBILITY",
159+
"type": "monster_flag",
160+
"//": "The monster is PERMANENTLY invisible. Be careful about using this one"
161+
},
157162
{
158163
"id": "ELECTRIC",
159164
"type": "monster_flag",

data/mods/Magiclysm/monster_factions.json

Lines changed: 41 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,14 @@
3939
},
4040
{
4141
"type": "MONSTER_FACTION",
42-
"name": "robot"
42+
"name": "robot",
43+
"neutral": [ "aerial_assassin" ]
4344
},
4445
{
4546
"type": "MONSTER_FACTION",
4647
"name": "wonder_forge",
4748
"hate": [ "zombie", "fungus" ],
49+
"neutral": [ "aerial_assassin" ],
4850
"friendly": [ "forge_lords" ]
4951
},
5052
{
@@ -79,18 +81,37 @@
7981
},
8082
{
8183
"type": "MONSTER_FACTION",
82-
"name": "magical_plant"
84+
"name": "magical_plant",
85+
"neutral": [ "triffid" ]
86+
},
87+
{
88+
"type": "MONSTER_FACTION",
89+
"name": "triffid",
90+
"copy-from": "triffid",
91+
"extend": { "neutral": [ "aerial_assassin", "magical_plant" ] }
8392
},
8493
{
8594
"type": "MONSTER_FACTION",
8695
"name": "mi-go",
8796
"copy-from": "mi-go",
8897
"base_faction": "nether",
8998
"friendly": [ "mi-go_summon" ],
90-
"neutral": [ "fish", "yrax", "small_animal", "slime", "passive_machine" ],
99+
"neutral": [ "fish", "yrax", "small_animal", "slime", "passive_machine", "aerial_assassin" ],
91100
"by_mood": [ "nether" ],
92101
"hate": [ "zombie", "triffid", "fungus", "exodii", "isolated_artisans" ]
93102
},
103+
{
104+
"type": "MONSTER_FACTION",
105+
"name": "zombie",
106+
"copy-from": "zombie",
107+
"extend": { "neutral": [ "aerial_assassin" ] }
108+
},
109+
{
110+
"type": "MONSTER_FACTION",
111+
"name": "bot",
112+
"copy-from": "bot",
113+
"extend": { "neutral": [ "aerial_assassin" ] }
114+
},
94115
{
95116
"type": "MONSTER_FACTION",
96117
"name": "mi-go_summon",
@@ -127,13 +148,29 @@
127148
"name": "animal",
128149
"copy-from": "animal",
129150
"friendly": [ "attack_player_only", "forest_spirit_faction", "earth_spirit_faction" ],
130-
"neutral": [ "small_animal", "fish", "bot", "aquatic_predator", "robofac", "passive_machine", "nether_player_hate" ],
151+
"neutral": [
152+
"small_animal",
153+
"fish",
154+
"bot",
155+
"aquatic_predator",
156+
"robofac",
157+
"passive_machine",
158+
"nether_player_hate",
159+
"aerial_assassin"
160+
],
131161
"by_mood": [ "animal" ]
132162
},
133163
{
134164
"type": "MONSTER_FACTION",
135165
"name": "herbivore",
136166
"copy-from": "herbivore",
137167
"friendly": [ "forest_spirit_faction", "earth_spirit_faction" ]
168+
},
169+
{
170+
"type": "MONSTER_FACTION",
171+
"name": "aerial_assassin",
172+
"base_faction": "nether_hate_humans",
173+
"neutral": [ "animal", "zombie", "mi-go", "bot", "triffid", "passive_machine", "robot", "wonder_forge" ],
174+
"by_mood": [ "dragon_black" ]
138175
}
139176
]

data/mods/Magiclysm/monsters/summoned.json

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,5 +101,68 @@
101101
"EATS"
102102
],
103103
"armor": { "bash": 60, "cut": 72, "acid": 18, "heat": 8, "bullet": 50, "psionic": 14 }
104+
},
105+
{
106+
"id": "mon_aerial_assassin",
107+
"type": "MONSTER",
108+
"name": { "str": "aerial assassin" },
109+
"description": "A puff of wind, barely visible. Only a few eddies in the air indicate that there is anything here at all.",
110+
"default_faction": "aerial_assassin",
111+
"species": [ "WIND_SPIRIT" ],
112+
"diff": 2,
113+
"volume": "750 ml",
114+
"weight": "1 kg",
115+
"hp": 60,
116+
"speed": 90,
117+
"symbol": "I",
118+
"color": "white",
119+
"aggression": 20,
120+
"morale": 100,
121+
"melee_skill": 6,
122+
"melee_dice": 1,
123+
"melee_dice_sides": 8,
124+
"melee_damage": [ { "damage_type": "bash", "amount": 3 } ],
125+
"dodge": 4,
126+
"vision_day": 25,
127+
"vision_night": 8,
128+
"families": [ "prof_wp_netherium_abomination" ],
129+
"harvest": "exempt",
130+
"special_attacks": [
131+
{
132+
"type": "monster_attack",
133+
"attack_type": "melee",
134+
"id": "smash",
135+
"move_cost": 150,
136+
"cooldown": 35,
137+
"damage_max_instance": [ { "damage_type": "bash", "amount": 3 } ],
138+
"throw_strength": 20,
139+
"hit_dmg_u": "A blast of wind hurls you off your feet!",
140+
"hit_dmg_npc": "A blast of wind hurls <npcname> off their feet!",
141+
"no_dmg_msg_u": "A blast of wind whips your clothes as it flies past.",
142+
"no_dmg_msg_npc": "A blast of wind whips <npcname>'s clothes as it flies past.",
143+
"miss_msg_u": "A blast of wind hurls you off your feet!",
144+
"miss_msg_npc": "A blast of wind hurls <npcname> off their feet!"
145+
}
146+
],
147+
"death_function": { "corpse_type": "NO_CORPSE", "message": "The %s blows away." },
148+
"flags": [
149+
"SEES",
150+
"HEARS",
151+
"GOODHEARING",
152+
"NOHEAD",
153+
"HARDTOSHOOT",
154+
"WEBWALK",
155+
"FLIES",
156+
"PLASTIC",
157+
"ACIDPROOF",
158+
"STUN_IMMUNE",
159+
"COLDPROOF",
160+
"BIOLOGICALPROOF",
161+
"BULLETPROOF",
162+
"HIT_AND_RUN",
163+
"NO_BREATHE",
164+
"NOGIB",
165+
"PERMANENT_INVISIBILITY"
166+
]
104167
}
105168
]

data/mods/Magiclysm/species.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,5 +113,12 @@
113113
"description": "A magical being of rock and stone.",
114114
"flags": [ "NEVER_WANDER", "NO_FUNG_DMG" ],
115115
"anger_triggers": [ "FRIEND_ATTACKED" ]
116+
},
117+
{
118+
"type": "SPECIES",
119+
"id": "WIND_SPIRIT",
120+
"description": "A magical being of wind and gale.",
121+
"flags": [ "NEVER_WANDER", "NO_FUNG_DMG" ],
122+
"anger_triggers": [ "FRIEND_ATTACKED" ]
116123
}
117124
]

data/mods/Magiclysm/worldgen/forge_of_wonders.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@
147147
{ "monster": "GROUP_FORGE_DWARVES", "x": [ 58, 60 ], "y": [ 19, 21 ], "density": 0.1 },
148148
{ "monster": "GROUP_FORGE_AUTOMATA", "x": [ 42, 47 ], "y": [ 9, 14 ], "density": 0.1 }
149149
],
150-
"monster": { "ö": { "monster": "mon_forgedemons" } },
150+
"monster": { "ö": { "monster": "mon_forgedemons" }, "÷": { "monster": "mon_aerial_assassin", "chance": 1 } },
151151
"place_zones": [
152152
{ "type": "LOOT_ITEM_GROUP", "filter": "NC_FORGE_LORD_SHOP", "faction": "forge_lords", "x": [ 43, 46 ], "y": 13 },
153153
{

data/mods/Magiclysm/worldgen/wizard-towers.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
",*Q_____## Y|H A##,,,........;;;;;;;;;;;;;...........................................................................",
3131
",*______*#=##ww#ww##,,,,.........;;;;;;;;;;;............................................................................"
3232
],
33-
"palettes": [ "wizardtower1_palette" ]
33+
"palettes": [ "wizardtower1_palette" ],
34+
"place_monster": [ { "monster": "mon_aerial_assassin", "x": [ 82, 85 ], "y": [ 9, 14 ], "chance": 20 } ]
3435
}
3536
},
3637
{
@@ -67,7 +68,8 @@
6768
"palettes": [ "wizardtower1_palette" ],
6869
"terrain": {
6970
",": [ [ "t_region_groundcover_urban", 50 ], [ "t_region_groundcover_forest", 5 ], "t_region_shrub", "t_region_tree" ]
70-
}
71+
},
72+
"place_monster": [ { "monster": "mon_aerial_assassin", "x": [ 82, 85 ], "y": [ 10, 13 ], "chance": 20 } ]
7173
}
7274
},
7375
{

doc/JSON/JSON_FLAGS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1193,6 +1193,7 @@ Used to describe monster characteristics and set their properties and abilities.
11931193
- ```PATH_AVOID_FALL``` This monster will path around cliffs instead of off of them.
11941194
- ```PATH_AVOID_FIRE``` This monster will path around heat-related dangers instead of through them.
11951195
- ```PAY_BOT``` Creature can be turned into a pet for a limited time in exchange of e-money.
1196+
- ```PERMANENT_INVISIBILITY` The monster is invisible under all circumstances and requires preternatural means to detect. Use with caution
11961197
- ```PET_HARNESSABLE``` Creature can be attached to a harness.
11971198
- ```PET_MOUNTABLE``` Creature can be ridden or attached to a harness.
11981199
- ```PET_WONT_FOLLOW``` This monster won't follow the player automatically when tamed.

src/creature.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,8 @@ bool Creature::sees( const map &here, const Creature &critter ) const
545545
// Check means to detect invisibility here
546546
if( ( has_flag( json_flag_TRUE_SEEING ) || has_flag( mon_flag_TRUESIGHT ) ) &&
547547
( critter.has_flag( mon_flag_CAMOUFLAGE ) || critter.has_effect_with_flag( json_flag_INVISIBLE ) ||
548-
critter.has_flag( mon_flag_NIGHT_INVISIBILITY ) ) ) {
548+
critter.has_flag( mon_flag_NIGHT_INVISIBILITY ) ||
549+
critter.has_flag( mon_flag_PERMANENT_INVISIBILITY ) ) ) {
549550
return true;
550551
}
551552

@@ -556,7 +557,8 @@ bool Creature::sees( const map &here, const Creature &critter ) const
556557
}
557558

558559
// Invisibility checked after stumbling and after invisibility detection methods
559-
if( critter.has_effect_with_flag( json_flag_INVISIBLE ) ) {
560+
if( critter.has_effect_with_flag( json_flag_INVISIBLE ) ||
561+
critter.has_flag( mon_flag_PERMANENT_INVISIBILITY ) ) {
560562
return false;
561563
}
562564

src/mtype.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ mon_flag_id mon_flag_ACIDPROOF,
133133
mon_flag_PATH_AVOID_FALL,
134134
mon_flag_PATH_AVOID_FIRE,
135135
mon_flag_PAY_BOT,
136+
mon_flag_PERMANENT_INVISIBILITY,
136137
mon_flag_PET_HARNESSABLE,
137138
mon_flag_PET_MOUNTABLE,
138139
mon_flag_PET_WONT_FOLLOW,
@@ -264,6 +265,7 @@ void set_mon_flag_ids()
264265
mon_flag_PATH_AVOID_FALL = mon_flag_id( "PATH_AVOID_FALL" );
265266
mon_flag_PATH_AVOID_FIRE = mon_flag_id( "PATH_AVOID_FIRE" );
266267
mon_flag_PAY_BOT = mon_flag_id( "PAY_BOT" );
268+
mon_flag_PERMANENT_INVISIBILITY = mon_flag_id( "PERMANENT_INVISIBILITY" );
267269
mon_flag_PET_HARNESSABLE = mon_flag_id( "PET_HARNESSABLE" );
268270
mon_flag_PET_MOUNTABLE = mon_flag_id( "PET_MOUNTABLE" );
269271
mon_flag_PET_WONT_FOLLOW = mon_flag_id( "PET_WONT_FOLLOW" );

src/mtype.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ extern mon_flag_id mon_flag_ACIDPROOF,
174174
mon_flag_PATH_AVOID_FALL,
175175
mon_flag_PATH_AVOID_FIRE,
176176
mon_flag_PAY_BOT,
177+
mon_flag_PERMANENT_INVISIBILITY,
177178
mon_flag_PET_HARNESSABLE,
178179
mon_flag_PET_MOUNTABLE,
179180
mon_flag_PET_WONT_FOLLOW,

0 commit comments

Comments
 (0)