Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New enchantment value: AVOID_FRIENDRY_FIRE #69500

Merged
merged 4 commits into from
Nov 21, 2023

Conversation

lispcoc
Copy link
Contributor

@lispcoc lispcoc commented Nov 18, 2023

Summary

None

Purpose of change

This game manages the line of fire on a tile-by-tile basis, making it easy for friendly fire to occur.
I think that adding CBM and mutations that avoid friendly fire can motivate players to take on challenges.

Describe the solution

Add new enchantment value: AVOID_FRIENDRY_FIRE. Setting it to 0.5 gives half a chance to avoid friendly fire, and setting it to 1.0 allows the character to attack enemies beyond their allies without causing friendly fire.

Describe alternatives you've considered

I think it would be better to introduce actual use cases along with the features, but I wasn't sure which section (or MOD) would be appropriate to introduce them.

Testing

I made the following items and equipped them to characters, and confirmed that friendly fire would not occur even if allies were in the line of fire.

  {
    "type": "TOOL_ARMOR",
    "id": "test_ring_avoid_friendly_fire",
    "weight": "4 g",
    "volume": "1 ml",
    "price": 5000,
    "material": [ "copper" ],
    "symbol": "[",
    "color": "light_red",
    "sided": true,
    "warmth": 0,
    "flags": [ "WATER_FRIENDLY", "ALLOWS_NATURAL_ATTACKS", "FANCY", "ONLY_ONE", "SKINTIGHT" ],
    "name": { "str": "ring of avoid friendy fire", "str_pl": "rings of avoid friendy fire" },
    "description": "A copper ring that makes you a little stronger when you wear it.",
    "relic_data": {
      "passive_effects": [ { "has": "WORN", "condition": "ALWAYS", "values": [ { "value": "AVOID_FRIENDRY_FIRE", "add": 1 } ] } ]
    },
    "armor": [ { "coverage": 0, "covers": [ "hand_l", "hand_r" ] } ]
  }

Additional context

@github-actions github-actions bot added <Documentation> Design documents, internal info, guides and help. [C++] Changes (can be) made in C++. Previously named `Code` [Markdown] Markdown issues and PRs Mechanics: Enchantments / Spells Enchantments and spells astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions labels Nov 18, 2023
@MNG-cataclysm
Copy link
Contributor

This could be used with gun proficiencies to represent high levels of skilled marksmanship regarding precision aiming. Can proficiencies give enchantments, come to think of it?

@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Nov 18, 2023
@lispcoc
Copy link
Contributor Author

lispcoc commented Nov 18, 2023

I don't think there is any proficiency regarding guns at the moment, but I think you can set the value with Math like other enchantments.

"values": [ { "value": "AVOID_FRIENDRY_FIRE", "add": { "math": [ "u_proficiency('prof_marksmanship', 'format': 'percent') / 100" ] } } ] } ]

@lispcoc lispcoc marked this pull request as ready for review November 18, 2023 13:28
@github-actions github-actions bot requested a review from KorGgenT November 18, 2023 13:28
@Maleclypse
Copy link
Member

In Xedra Evolved Mad genius could make a gunmod or a specific gun that does so and Eater could have a spell that grants an effect to “curve bullets”. Especially if I could use the value in math so it levels with the character and becomes more likely to avoid friendly fire.

@Standing-Storm
Copy link
Contributor

Standing-Storm commented Nov 19, 2023

This would be perfect to add to the Clairsentient power Marksman's Eye--firing where the psion knows the enemy will be and their allies will not be.

@Maleclypse Maleclypse merged commit 0507b4c into CleverRaven:master Nov 21, 2023
37 of 38 checks passed
@lispcoc lispcoc deleted the avoid_friendly_fire branch November 21, 2023 02:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` <Documentation> Design documents, internal info, guides and help. json-styled JSON lint passed, label assigned by github actions [Markdown] Markdown issues and PRs Mechanics: Enchantments / Spells Enchantments and spells
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants