Compare commits

...

3 Commits

Author SHA1 Message Date
Ponk
d5be9130aa Add bug report issue template 2024-05-09 11:53:54 +02:00
Ponk
b5871c7be2 Merge pull request #219 from Silwhoon/mobskill-prop-handling #patch
Mob Skills now have a success rate
2024-02-07 06:49:24 +01:00
Silwhoon
f9b328b432 Mob Skills now have a success rate
This was only used for MAGIC_IMMUNITY and WEAPON_IMMUNITY for some reason? A lot of other MobSkills also have a 'prop' node in the WZ files such as; Darkness and Seduce
2024-02-05 17:58:43 +00:00
2 changed files with 31 additions and 2 deletions

24
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,24 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
**Describe the bug**
A clear and concise description (in English) of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.

View File

@@ -190,6 +190,11 @@ public class MobSkill {
// TODO: avoid output argument banishPlayersOutput
public void applyEffect(Character player, Monster monster, boolean skill, List<Character> banishPlayersOutput) {
// See if the MobSkill is successful before doing anything
if (!makeChanceResult()) {
return;
}
Disease disease = null;
Map<MonsterStatus, Integer> stats = new EnumMap<>(MonsterStatus.class);
List<Integer> reflection = new ArrayList<>();
@@ -213,12 +218,12 @@ public class MobSkill {
case REVERSE_INPUT -> disease = Disease.CONFUSE;
case UNDEAD -> disease = Disease.ZOMBIFY;
case PHYSICAL_IMMUNE -> {
if (makeChanceResult() && !monster.isBuffed(MonsterStatus.MAGIC_IMMUNITY)) {
if (!monster.isBuffed(MonsterStatus.MAGIC_IMMUNITY)) {
stats.put(MonsterStatus.WEAPON_IMMUNITY, x);
}
}
case MAGIC_IMMUNE -> {
if (makeChanceResult() && !monster.isBuffed(MonsterStatus.WEAPON_IMMUNITY)) {
if (!monster.isBuffed(MonsterStatus.WEAPON_IMMUNITY)) {
stats.put(MonsterStatus.MAGIC_IMMUNITY, x);
}
}