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

Fixes some issues with traps #2182

Merged
merged 2 commits into from
Oct 21, 2018

Conversation

guilherme-gm
Copy link
Member

@guilherme-gm guilherme-gm commented Aug 21, 2018

Pull Request Prelude

Changes Proposed

These commits fixes two issues related to traps.

  • The first one allows traps that causes damage to be reflected by skills/cards that gives physical attack reflection (e.g. Reflect Shield and High Orc Card). This feature can be turned off in skill.conf to get old effect back.
    As we don't have information about some 3rd classes traps I let them commented out until we're sure they can also be reflected.

  • The second issue refers to Blastimine and Claymore Trap damage behavior. The damage caused by these traps must be split by the number of enemies affected by them.

Affected Branches:

master

Issues addressed:

Known Issues and TODO List

Special thanks to @kyeme

@HerculesWSAPI
Copy link
Contributor

This change is Reviewable

@guilherme-gm guilherme-gm changed the base branch from stable to master August 21, 2018 00:40
src/map/battle.c Outdated
@@ -4339,6 +4339,27 @@ static struct Damage battle_calc_misc_attack(struct block_list *src, struct bloc
}
break;
}

if (battle_config.trap_reflect == true) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this code with if and switch better move into separate function

src/map/skill.c Outdated
@@ -16864,7 +16865,11 @@ static int skill_trap_splash(struct block_list *bl, va_list ap)
}
/* Fall through */
default:
skill->attack(skill->get_type(sg->skill_id),ss,src,bl,sg->skill_id,sg->skill_lv,tick,0);
// if trap damage should be split among targets, count them
if (skill->get_nk(sg->skill_id)&NK_SPLASHSPLIT)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need space before & and after it

@MishimaHaruna MishimaHaruna added this to the Release v2018.10.21 milestone Sep 23, 2018
@MishimaHaruna MishimaHaruna merged commit b196e2b into HerculesWS:master Oct 21, 2018
@guilherme-gm guilherme-gm deleted the 201808-trapfix branch February 24, 2023 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants