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

Crushing Leap doesn't deal damage #53511

Open
gisaku33 opened this issue Dec 17, 2021 · 3 comments
Open

Crushing Leap doesn't deal damage #53511

gisaku33 opened this issue Dec 17, 2021 · 3 comments
Labels
Mechanics: Enchantments / Spells Enchantments and spells (S2 - Confirmed) Bug that's been confirmed to exist

Comments

@gisaku33
Copy link
Contributor

Describe the bug

The Crushing Leap spell from the Crushing Leap mutation doesn't deal damage when either aiming at an enemy or past one, instead you land in front of them with no other effect.

Steps to reproduce

  1. Make a character with the Crushing Leap mutation.
  2. Cast the Crushing Leap ability, either aimed directly on or past an enemy.
  3. Wish that frogs had tear ducts so you could cry.

Expected behavior

I expected the Crushing Leap to Crush when Leaping.

Screenshots

image
image

Versions and configuration

  • OS: Windows
    • OS Version: 10.0 2009
  • Game Version: 8b7a449 [64-bit]
  • Graphics Version: Tiles
  • Game Language: System language []
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    No Fungal Growth [no_fungal_growth],
    Bionic Professions [package_bionic_professions],
    Blaze Industries [blazeindustries],
    C.R.I.T Expansion Mod [crt_expansion],
    Magiclysm [magiclysm],
    Mythical Martial Arts [MMA],
    Stats Through Kills [stats_through_kills],
    SpeedyDex [speedydex]
    ]

Additional context

No response

@Maleclypse Maleclypse added (S2 - Confirmed) Bug that's been confirmed to exist Mechanics: Enchantments / Spells Enchantments and spells labels Dec 17, 2021
@Maleclypse Maleclypse added this to Suggested release blockers in 0.G Stable Tracker via automation Dec 17, 2021
@Maleclypse Maleclypse moved this from Suggested release blockers to Confirmed release blockers in 0.G Stable Tracker May 4, 2022
Stadler76 added a commit to Stadler76/Cataclysm-DDA that referenced this issue Jun 28, 2022
Unfortunately I can't properly test its damage because of issue CleverRaven#53511
bombasticSlacks pushed a commit that referenced this issue Jul 4, 2022
* Feet mutations for lizards and birds.

In short: I've done the following:
- moved the Clawed Feet mutation out of Magiclysm into the main game.
- added the Taloned Feet mutation for birds.
- for quick testing I've added the flag `ALLOWS_TALONS` to ankle socks (Should be expanded to more footwear later)

* No more ALLOWS_TALONS for ankle socks and changed attack text for birds

In addition to that I've toned down bird feet DPS a bit. Note, that balancing them is still incomplete.

* Rebalanced bird vs. raptor vs. lizard DPS.

* Toned down DPS for bird and lizard feet even more.

* Replaced avian feet random damage with the Talon Leap spell

Unfortunately I can't properly test its damage because of issue #53511

* Forgot the recent changes ...

* Require a target for Talon Leap

* Added a comment (TODO: balancing) to the spell.

* Apply suggestions from code review

* Converted Taloned Feet to Avian Legs

In addition to that they now require bird wings because of the avian leap spell.
The `"threshreq": [ "THRESH_BIRD" ],` might be a bit redundant here, but I want to avoid the game attempting to mutate towards them pre-threshold.

* Reworded and shortened Avian Legs description.

* Reverted the changes to clawed feet

In favor of changing RAP_TALONS into RAPTOR_LEGS at some later point they had to move. They can always be revisted later.

... and partially as per discussion.

Co-authored-by: Maleclypse <54345792+Maleclypse@users.noreply.github.com>
Drew4484 pushed a commit to Drew4484/Cataclysm-DDA that referenced this issue Jul 4, 2022
* Feet mutations for lizards and birds.

In short: I've done the following:
- moved the Clawed Feet mutation out of Magiclysm into the main game.
- added the Taloned Feet mutation for birds.
- for quick testing I've added the flag `ALLOWS_TALONS` to ankle socks (Should be expanded to more footwear later)

* No more ALLOWS_TALONS for ankle socks and changed attack text for birds

In addition to that I've toned down bird feet DPS a bit. Note, that balancing them is still incomplete.

* Rebalanced bird vs. raptor vs. lizard DPS.

* Toned down DPS for bird and lizard feet even more.

* Replaced avian feet random damage with the Talon Leap spell

Unfortunately I can't properly test its damage because of issue CleverRaven#53511

* Forgot the recent changes ...

* Require a target for Talon Leap

* Added a comment (TODO: balancing) to the spell.

* Apply suggestions from code review

* Converted Taloned Feet to Avian Legs

In addition to that they now require bird wings because of the avian leap spell.
The `"threshreq": [ "THRESH_BIRD" ],` might be a bit redundant here, but I want to avoid the game attempting to mutate towards them pre-threshold.

* Reworded and shortened Avian Legs description.

* Reverted the changes to clawed feet

In favor of changing RAP_TALONS into RAPTOR_LEGS at some later point they had to move. They can always be revisted later.

... and partially as per discussion.

Co-authored-by: Maleclypse <54345792+Maleclypse@users.noreply.github.com>
@GuardianDll
Copy link
Member

To fix it, someone need:
first - add aoe_min and aoe_max to spell (5 is the smallest valid number that works in my tests, anything bigger would be too big)
second - change how dash effect interact, when you target some critter - right now it jumps to this monster, but deal no damage (jumping to point before the target works fine, which is odd)

@dseguin dseguin moved this from To-do to In Progress in 0.G Stable Tracker Sep 3, 2022
@GuardianDll
Copy link
Member

GuardianDll commented Sep 4, 2022

Repost it here from #60704, so it wont be missed:

Just tested it, and leap works even worse than i thought
instead of dealing damage for targets after the jump (i dont really understand how AoE field interacts with leap, but it seems really smart to work in that way) it deals damage to the target before the jump. its hard to explain, but if our character jump on a distance of 1, and aoe is 6, it means it can jump on distance 1, and deal damage to 5 (6 aoe minus 1) targets. But if it tries to jump on distance 6, it wont be able to deal any damage at all
and if there would be an aoe 2, it means it can jump on distance 1 and attack 1 monster ahead (2 aoe minus 1), or jump on distance 6 and deal no damage at all
tldr: it doesnt work. id prefer to close this pr at all, and tomorrow ill redo the damage leap spells to be two action spell - first is the leap, and second is subspell, that will deal some damage around the character after the jump.

Short answer: leap effect is awful and must be burned in fire
long answer: leap spell has some extremely weird behaviour, which prevent using it in any damage dealing process. i cant even desribe the bug itself, but short demo may explain it for a bit
https://imgur.com/a/ShtFrsY

andrei8l had posted this quick and dirty dif in devcord for some ideas as to how to fix this.

index 091a9f2464..240b9e1d8d 100644
--- a/src/magic.cpp
+++ b/src/magic.cpp
@@ -1528,6 +1528,7 @@ void spell::cast_spell_effect( Creature &source, const tripoint &target ) const
 
 void spell::cast_all_effects( Creature &source, const tripoint &target ) const
 {
+    tripoint_abs_ms const target_abs = get_map().getglobal( target );
     if( has_flag( spell_flag::WONDER ) ) {
         const auto iter = type->additional_spells.begin();
         for( int num_spells = std::abs( damage() ); num_spells > 0; num_spells-- ) {
@@ -1543,26 +1544,29 @@ void spell::cast_all_effects( Creature &source, const tripoint &target ) const
             // if a message is added to the casting spell, it will be sent as well.
             source.add_msg_if_player( sp.message() );
 
+            tripoint const target_local = get_map().getlocal( target_abs );
             if( sp.has_flag( spell_flag::RANDOM_TARGET ) ) {
                 if( const cata::optional<tripoint> new_target = sp.random_valid_target( source,
-                        _self ? source.pos() : target ) ) {
+                        _self ? source.pos() : target_local ) ) {
                     sp.cast_all_effects( source, *new_target );
                 }
             } else {
                 if( _self ) {
                     sp.cast_all_effects( source, source.pos() );
                 } else {
-                    sp.cast_all_effects( source, target );
+                    sp.cast_all_effects( source, target_local );
                 }
             }
         }
     } else {
         if( has_flag( spell_flag::EXTRA_EFFECTS_FIRST ) ) {
             cast_extra_spell_effects( source, target );
-            cast_spell_effect( source, target );
+            tripoint const target_local = get_map().getlocal( target_abs );
+            cast_spell_effect( source, target_local );
         } else {
             cast_spell_effect( source, target );
-            cast_extra_spell_effects( source, target );
+            tripoint const target_local = get_map().getlocal( target_abs );
+            cast_extra_spell_effects( source, target_local );
         }
     }
 }

upd: i compiled said code, but it doesn't resolve the bug in any way

@I-am-Erk
Copy link
Member

I-am-Erk commented Nov 23, 2022

I am moving this from release blockers as it appears to be a fairly complex fix, and while we definitely want it fixed, I don't think we can let it delay stable further.

however, absolutely fix it if you think you can, this is a fairly significant bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mechanics: Enchantments / Spells Enchantments and spells (S2 - Confirmed) Bug that's been confirmed to exist
Projects
0.G Stable Tracker
  
Pushed Out
Development

Successfully merging a pull request may close this issue.

4 participants