Skip to content

Commit

Permalink
Remove unnecessary damage types (#75464)
Browse files Browse the repository at this point in the history
* remove yugg barb damage type

* remove genetic_damage_pierce damage type

* confirm that beta can mutate, not alpha

* whitelist gene_sting in GG validator properly

* Update data/mods/Xedra_Evolved/monster_special_attacks/monster_special_attacks.json

* simplify damage check

* fix mistake in EoC, document relation between different entities in the game
  • Loading branch information
GuardianDll authored Aug 8, 2024
1 parent a4755e0 commit 643bab3
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 77 deletions.
6 changes: 6 additions & 0 deletions data/json/ammo_effects.json
Original file line number Diff line number Diff line change
Expand Up @@ -421,5 +421,11 @@
"type": "ammo_effect",
"//": "Creates a trail of laser",
"trail": { "field_type": "fd_laser", "intensity_min": 2, "intensity_max": 2 }
},
{
"id": "GENE_STING_BARB",
"type": "ammo_effect",
"//": "runs EoC that cause you to mutate",
"eoc": [ "EOC_random_mutate" ]
}
]
45 changes: 0 additions & 45 deletions data/json/damage_types.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,51 +140,6 @@
"melee_combat_info": { "order": 600, "show_type": false },
"ablative_info": { "order": 600, "show_type": false }
},
{
"id": "genetic_damage_pierce",
"type": "damage_type",
"physical": true,
"edged": true,
"melee_only": true,
"magic_color": "light_green",
"name": "genetic pierce",
"skill": "stabbing",
"derived_from": [ "stab", 1 ],
"immune_flags": { "character": [ "STAB_IMMUNE" ] },
"ondamage_eocs": [ "EOC_random_mutate" ]
},
{
"id": "genetic_damage_pierce",
"type": "damage_info_order",
"info_display": "detailed",
"verb": "shocking",
"bionic_info": { "order": 601, "show_type": true },
"protection_info": { "order": 701, "show_type": true },
"pet_prot_info": { "order": 701, "show_type": false },
"melee_combat_info": { "order": 601, "show_type": false },
"ablative_info": { "order": 601, "show_type": false }
},
{
"id": "genetic_damage_ballistic",
"type": "damage_type",
"physical": true,
"magic_color": "light_green",
"name": "genetic ballistic",
"derived_from": [ "bullet", 1 ],
"immune_flags": { "character": [ "BULLET_IMMUNE" ] },
"ondamage_eocs": [ "EOC_random_mutate" ]
},
{
"id": "genetic_damage_ballistic",
"type": "damage_info_order",
"info_display": "detailed",
"verb": "shocking",
"bionic_info": { "order": 601, "show_type": true },
"protection_info": { "order": 701, "show_type": true },
"pet_prot_info": { "order": 701, "show_type": false },
"melee_combat_info": { "order": 601, "show_type": false },
"ablative_info": { "order": 601, "show_type": false }
},
{
"//": "e.g. fire, plasma",
"id": "heat",
Expand Down
3 changes: 2 additions & 1 deletion data/json/items/ammo/barb.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
"volume": "250 ml",
"weight": "30 g",
"ammo_type": "gene_sting",
"damage": { "damage_type": "genetic_damage_ballistic", "amount": 5, "armor_penetration": 5 },
"damage": { "damage_type": "bullet", "amount": 5, "armor_penetration": 5 },
"effects": [ "GENE_STING_BARB" ],
"dispersion": 120,
"loudness": 0,
"count": 10,
Expand Down
30 changes: 1 addition & 29 deletions data/json/monster_special_attacks/spells.json
Original file line number Diff line number Diff line change
Expand Up @@ -586,38 +586,10 @@
"min_field_intensity": 1,
"max_field_intensity": 2
},
{
"type": "SPELL",
"id": "spell_gene_sting",
"name": { "str": "Gene Sting" },
"description": "Yugg attack which causes random mutation.",
"effect": "attack",
"shape": "blast",
"valid_targets": [ "hostile" ],
"min_range": 24,
"max_range": 24,
"sound_description": "ssszziiipp",
"damage_type": "biological",
"min_damage": 0,
"extra_effects": [ { "id": "spell_gene_sting_selector" } ]
},
{
"id": "spell_gene_sting_selector",
"type": "SPELL",
"name": "Gene Sting Selector",
"description": "The spell fires the EOC for the yugg gene sting. It's a bug if you have it.",
"message": "",
"valid_targets": [ "hostile" ],
"flags": [ "NO_FAIL", "SILENT", "NO_HANDS", "NO_LEGS" ],
"effect": "effect_on_condition",
"effect_str": "EOC_random_mutate",
"shape": "blast",
"max_level": 1
},
{
"type": "effect_on_condition",
"id": "EOC_random_mutate",
"condition": { "and": [ { "math": [ "_damage_taken", ">", "0" ] }, "u_is_npc" ] },
"condition": { "and": [ { "math": [ "_proj_damage + _damage > 0" ] }, "npc_is_character", "has_beta" ] },
"effect": [
{ "set_string_var": "<random_category>", "target_var": { "context_val": "dart_mutation_category" }, "parse_tags": true },
{ "npc_mutate_category": { "context_val": "dart_mutation_category" }, "use_vitamins": false }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@
"id": "inject_warping_poison",
"cooldown": 25,
"move_cost": 150,
"damage_max_instance": [ { "damage_type": "genetic_damage_pierce", "amount": 15, "armor_penetration": 8, "armor_multiplier": 0.5 } ],
"damage_max_instance": [ { "damage_type": "stab", "amount": 15, "armor_penetration": 8, "armor_multiplier": 0.5 } ],
"hitsize_min": 4,
"hit_dmg_u": "%1$s bites and injects poison into your %2$s!",
"hit_dmg_npc": "%1$s bites and injects poison into your <npcname>!",
"miss_msg_u": "%1$s tries to bite your %2$s, but you dodge!",
"miss_msg_npc": "%1$s tries to bite <npcname>, but they dodge!",
"no_dmg_msg_u": "%1$s tries to bite your %2$s, but fails to penetrate your armor.",
"no_dmg_msg_npc": "%1$s tries to bite <npcname>, but fails to penetrate their armor.",
"eoc": [ "EOC_random_mutate" ],
"dodgeable": true,
"blockable": true
},
Expand Down
7 changes: 7 additions & 0 deletions doc/EFFECT_ON_CONDITION.md
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,13 @@ return true if alpha talker is female
- `npc` is any NPC, except Avatar
- `character` is both NPC or Avatar

```
Creature ---> Character ---> avatar
\ \
\ \--> npc
\---> monster
```

#### Valid talkers:

| Avatar | Character | NPC | Monster | Furniture | Item |
Expand Down
2 changes: 1 addition & 1 deletion tools/json_tools/generic_guns_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
'chemical_spray',
'fishspear',
'flammable',
'gene_sting_barb',
'gene_sting',
'm235', # Rocket
'metal_rail',
'nail',
Expand Down

0 comments on commit 643bab3

Please sign in to comment.