-
Notifications
You must be signed in to change notification settings - Fork 26
small qol #50
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
base: slow_kotlin
Are you sure you want to change the base?
small qol #50
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -955,14 +955,18 @@ private void add(POISON ws) { | |
| if (ws.type.unstackable) | ||
| list.removeIf(e -> e.type.unstackable && type(e) == type(ws)); | ||
| ws.prob = 0; // used as counter | ||
|
|
||
| list.add(ws); | ||
| getMax(); | ||
| } | ||
|
|
||
| private void damage(int dmg, int type) { | ||
| type &= 3; | ||
| long mul = type == 0 ? 100 : type == 1 ? e.maxH : type == 2 ? e.health : (e.maxH - e.health); | ||
|
|
||
| e.damage += mul * dmg / 100; | ||
|
|
||
|
|
||
|
Comment on lines
+968
to
+969
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please remove unnecessary linebreaks |
||
| } | ||
|
|
||
| private void getMax() { | ||
|
|
@@ -1125,7 +1129,24 @@ private void doRevive(int c) { | |
| deadAnim += ea.getEAnim(ZombieEff.REVIVE).len(); | ||
| e.status[P_REVIVE][1] = deadAnim; | ||
| int maxR = maxRevHealth(); | ||
| e.health = e.maxH * maxR / 100; | ||
|
|
||
| // set how much health to revive with | ||
| long reviveHealth = e.maxH * maxR / 100; | ||
|
|
||
| // if revive health exceeds max health, update the max health | ||
| if (reviveHealth > e.maxH) | ||
| { | ||
| e.maxH = reviveHealth; | ||
| e.health = e.maxH; | ||
| } | ||
|
|
||
| // otherwise set health as normal | ||
| else | ||
| { | ||
| e.health = reviveHealth; | ||
| } | ||
|
|
||
|
|
||
|
Comment on lines
+1132
to
+1149
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I know this idea would be good, but please don't touch maximum HP as it will ruin interaction between healing. Touching |
||
| if (c == 1) | ||
| e.status[P_REVIVE][0]--; | ||
| else if (c == 2) | ||
|
|
@@ -1438,6 +1459,12 @@ public void update() { | |
| */ | ||
| private boolean killCounted = false; | ||
|
|
||
|
|
||
| /** | ||
| * Damage to use for poison | ||
| */ | ||
| private int poisonDamage = 0; | ||
|
|
||
| /** | ||
| * cooldown timer for regeneration ability | ||
| */ | ||
|
|
@@ -1455,6 +1482,12 @@ protected Entity(StageBasis b, MaskEntity de, EAnimU ea, float atkMagnif, float | |
| maxCurrentShield = currentShield = (int) (de.getProc().DEMONSHIELD.hp * hpMagnif); | ||
| shieldMagnification = hpMagnif; | ||
| regentimer = getProc().HPREGEN.interval; | ||
|
|
||
| // scale poison damage with mag if option is enabled, otherwise keep poison damage to set value | ||
| poisonDamage = de.getProc().POISON.damage; | ||
| if (de.getProc().POISON.type.scaleWithBuff) { | ||
| poisonDamage = (int) (((float) poisonDamage) * atkMagnif); | ||
| } | ||
| } | ||
|
|
||
| protected Entity(StageBasis b, MaskEntity de, EAnimU ea, float lvMagnif, float tAtk, float tHP, PCoin pc, Level lv) { | ||
|
|
@@ -1478,6 +1511,7 @@ protected Entity(StageBasis b, MaskEntity de, EAnimU ea, float lvMagnif, float t | |
| status[P_REVIVE][0] = getProc().REVIVE.count; | ||
| status[P_DMGCUT][0] = getProc().DMGCUT.type.magnif ? (int) (lvMagnif * getProc().DMGCUT.dmg) : getProc().DMGCUT.dmg; | ||
| status[P_DMGCAP][0] = getProc().DMGCAP.type.magnif ? (int) (lvMagnif * getProc().DMGCAP.dmg) : getProc().DMGCAP.dmg; | ||
|
|
||
| presetStatus(lvMagnif); | ||
| presetSealedProcs(); | ||
| maxCurrentShield = currentShield = (int) (de.getProc().DEMONSHIELD.hp * lvMagnif); | ||
|
|
@@ -1825,6 +1859,7 @@ private void processProcs(AttackAb atk) { | |
| if (!(ctargetable(atk.trait, atk.attacker, false) || (receive(-1) && atk.SPtr) || (receive(1) && !atk.SPtr))) | ||
| return; | ||
|
|
||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unnecessary linebreak |
||
| boolean cannonResist = atk.canon > 0 && getProc().IMUCANNON.exists() && (atk.canon & getProc().IMUCANNON.type) > 0; | ||
| if (atk.getProc().POIATK.mult > 0) { | ||
| int rst = getProc().IMUPOIATK.mult; | ||
|
|
@@ -1992,8 +2027,10 @@ private void processProcs(AttackAb atk) { | |
|
|
||
| ws.time = ws.time * (100 - res) / 100; | ||
|
|
||
| ws.damage = atk.attacker.poisonDamage; | ||
|
|
||
| if (atk.atk != 0 && ws.type.modifAffected) | ||
| ws.damage = (int) (ws.damage * (float) getDamage(atk, atk.atk) / atk.atk); | ||
| ws.damage = (int) (atk.attacker.poisonDamage * (float) getDamage(atk, atk.atk) / atk.atk); | ||
|
|
||
| pois.add(ws); | ||
| anim.getEff(P_POISON); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <module type="JAVA_MODULE" version="4"> | ||
| <component name="NewModuleRootManager" inherit-compiler-output="true"> | ||
| <exclude-output /> | ||
| <content url="file://$MODULE_DIR$"> | ||
| <sourceFolder url="file://$MODULE_DIR$" isTestSource="false" packagePrefix="common" /> | ||
| </content> | ||
| <orderEntry type="inheritedJdk" /> | ||
| <orderEntry type="sourceFolder" forTests="false" /> | ||
| </component> | ||
| </module> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should not open core code repository with any IDE. This repository is supposed to be submodule of other repository. For example, you just open BCU PC project, git clone this repository, and put it under "[BCU PC Project Folder]/src/main/java/" and rename clone folder to "common". Please remove all of these IDEA project folders and files