fix: remove infinity stones from the map on space stone teleports
This commit is contained in:
parent
315c7d2891
commit
d69376c110
@ -452,6 +452,15 @@ public class GameLogic {
|
|||||||
.withOriginField(data.originField)
|
.withOriginField(data.originField)
|
||||||
.withTargetField(data.targetField)
|
.withTargetField(data.targetField)
|
||||||
.buildCharacterEvent());
|
.buildCharacterEvent());
|
||||||
|
for(Entity entity: state.entities.findByPosition(data.targetField)) {
|
||||||
|
if(entity instanceof InfinityStone) {
|
||||||
|
result.add(new EventBuilder(EventType.DestroyedEntityEvent)
|
||||||
|
.withTargetField(data.targetField)
|
||||||
|
.withTargetEntity(entity.id)
|
||||||
|
.buildEntityEvent());
|
||||||
|
break; //we should only have one entity per field anyways
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
case MindStone -> {
|
case MindStone -> {
|
||||||
EntityType target = data.originEntity.type == EntityType.P1 ? EntityType.P2 : EntityType.P1;
|
EntityType target = data.originEntity.type == EntityType.P1 ? EntityType.P2 : EntityType.P1;
|
||||||
|
Loading…
Reference in New Issue
Block a user