mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-14 07:55:57 +01:00
Format code [skip actions]
This commit is contained in:
@@ -83,12 +83,15 @@ public class EntityMonster extends GameEntity {
|
||||
this.configEntityMonster = null;
|
||||
}
|
||||
|
||||
if (this.configEntityMonster != null &&
|
||||
this.configEntityMonster.getCombat() != null &&
|
||||
this.configEntityMonster.getCombat().getSummon() != null &&
|
||||
this.configEntityMonster.getCombat().getSummon().getSummonTags() != null) {
|
||||
this.configEntityMonster.getCombat().getSummon().getSummonTags().forEach(
|
||||
t -> this.summonTagMap.put(t.getSummonTag(), null));
|
||||
if (this.configEntityMonster != null
|
||||
&& this.configEntityMonster.getCombat() != null
|
||||
&& this.configEntityMonster.getCombat().getSummon() != null
|
||||
&& this.configEntityMonster.getCombat().getSummon().getSummonTags() != null) {
|
||||
this.configEntityMonster
|
||||
.getCombat()
|
||||
.getSummon()
|
||||
.getSummonTags()
|
||||
.forEach(t -> this.summonTagMap.put(t.getSummonTag(), null));
|
||||
}
|
||||
|
||||
// Monster weapon
|
||||
@@ -408,13 +411,9 @@ public class EntityMonster extends GameEntity {
|
||||
var data = this.getMonsterData();
|
||||
|
||||
var aiInfo =
|
||||
SceneEntityAiInfo.newBuilder()
|
||||
.setIsAiOpen(true)
|
||||
.setBornPos(this.getBornPos().toProto());
|
||||
SceneEntityAiInfo.newBuilder().setIsAiOpen(true).setBornPos(this.getBornPos().toProto());
|
||||
if (ownerEntityId != 0) {
|
||||
aiInfo.setServantInfo(
|
||||
ServantInfo.newBuilder()
|
||||
.setMasterEntityId(ownerEntityId));
|
||||
aiInfo.setServantInfo(ServantInfo.newBuilder().setMasterEntityId(ownerEntityId));
|
||||
}
|
||||
|
||||
var authority =
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package emu.grasscutter.game.entity;
|
||||
|
||||
import emu.grasscutter.Grasscutter;
|
||||
import emu.grasscutter.data.GameData;
|
||||
import emu.grasscutter.data.binout.*;
|
||||
import emu.grasscutter.game.ability.*;
|
||||
@@ -122,8 +121,9 @@ public abstract class GameEntity {
|
||||
public void onAddAbilityModifier(AbilityModifier data) {
|
||||
// Set limbo state (invulnerability at a certain HP threshold)
|
||||
// if ability modifier calls for it
|
||||
if (data.state == AbilityModifier.State.Limbo &&
|
||||
data.properties != null && data.properties.Actor_HpThresholdRatio > .0f) {
|
||||
if (data.state == AbilityModifier.State.Limbo
|
||||
&& data.properties != null
|
||||
&& data.properties.Actor_HpThresholdRatio > .0f) {
|
||||
this.setLimbo(data.properties.Actor_HpThresholdRatio);
|
||||
}
|
||||
}
|
||||
@@ -198,8 +198,8 @@ public abstract class GameEntity {
|
||||
// Don't let entity die while in limbo.
|
||||
effectiveDamage = curHp - 1;
|
||||
}
|
||||
}
|
||||
else if (curHp != Float.POSITIVE_INFINITY && !lockHP || lockHP && curHp <= event.getDamage()) {
|
||||
} else if (curHp != Float.POSITIVE_INFINITY && !lockHP
|
||||
|| lockHP && curHp <= event.getDamage()) {
|
||||
effectiveDamage = event.getDamage();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user