mirror of
https://github.com/OMGeeky/ATCS.git
synced 2025-12-26 23:57:25 +01:00
use BasicEffect for HitReceivedEffect values to reuse logic
This commit is contained in:
@@ -452,24 +452,24 @@ public class NPC extends JSONElement {
|
||||
apJson.put("max", this.hit_received_effect.ap_boost_max);
|
||||
else apJson.put("max", 0);
|
||||
}
|
||||
if (this.hit_received_effect.hp_boost_min_target != null || this.hit_received_effect.hp_boost_max_target != null) {
|
||||
if (this.hit_received_effect.target.hp_boost_min != null || this.hit_received_effect.target.hp_boost_max != null) {
|
||||
Map hpJson = new LinkedHashMap();
|
||||
hitReceivedEffectJson.put("increaseAttackerCurrentHP", hpJson);
|
||||
if (this.hit_received_effect.hp_boost_min_target != null)
|
||||
hpJson.put("min", this.hit_received_effect.hp_boost_min_target);
|
||||
if (this.hit_received_effect.target.hp_boost_min != null)
|
||||
hpJson.put("min", this.hit_received_effect.target.hp_boost_min);
|
||||
else hpJson.put("min", 0);
|
||||
if (this.hit_received_effect.hp_boost_max_target != null)
|
||||
hpJson.put("max", this.hit_received_effect.hp_boost_max_target);
|
||||
if (this.hit_received_effect.target.hp_boost_max != null)
|
||||
hpJson.put("max", this.hit_received_effect.target.hp_boost_max);
|
||||
else hpJson.put("max", 0);
|
||||
}
|
||||
if (this.hit_received_effect.ap_boost_min_target != null || this.hit_received_effect.ap_boost_max_target != null) {
|
||||
if (this.hit_received_effect.target.ap_boost_min != null || this.hit_received_effect.target.ap_boost_max != null) {
|
||||
Map apJson = new LinkedHashMap();
|
||||
hitReceivedEffectJson.put("increaseAttackerCurrentAP", apJson);
|
||||
if (this.hit_received_effect.ap_boost_min_target != null)
|
||||
apJson.put("min", this.hit_received_effect.ap_boost_min_target);
|
||||
if (this.hit_received_effect.target.ap_boost_min != null)
|
||||
apJson.put("min", this.hit_received_effect.target.ap_boost_min);
|
||||
else apJson.put("min", 0);
|
||||
if (this.hit_received_effect.ap_boost_max_target != null)
|
||||
apJson.put("max", this.hit_received_effect.ap_boost_max_target);
|
||||
if (this.hit_received_effect.target.ap_boost_max != null)
|
||||
apJson.put("max", this.hit_received_effect.target.ap_boost_max);
|
||||
else apJson.put("max", 0);
|
||||
}
|
||||
if (this.hit_received_effect.conditions_source != null) {
|
||||
|
||||
Reference in New Issue
Block a user