-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
47 changed files
with
586 additions
and
92 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Submodule leekscript
updated
71 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.leekwars.generator.area; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import com.leekwars.generator.attack.Attack; | ||
import com.leekwars.generator.maps.Cell; | ||
import com.leekwars.generator.maps.Map; | ||
import com.leekwars.generator.state.Entity; | ||
|
||
public class AreaAllies extends Area { | ||
|
||
public AreaAllies(Attack attack) { | ||
super(attack); | ||
} | ||
|
||
@Override | ||
public List<Cell> getArea(Map map, Cell launchCell, Cell targetCell, Entity caster) { | ||
var cells = new ArrayList<Cell>(); | ||
if (caster != null) { | ||
for (var entity : map.getState().getEntities().values()) { | ||
if (entity.getTeam() == caster.getTeam() && entity.getName().contains("crystal")) continue; | ||
if (entity.getCell() != null && entity.getTeam() == caster.getTeam()) { | ||
cells.add(entity.getCell()); | ||
} | ||
} | ||
} | ||
return cells; | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
src/main/java/com/leekwars/generator/area/AreaEnemies.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.leekwars.generator.area; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import com.leekwars.generator.attack.Attack; | ||
import com.leekwars.generator.maps.Cell; | ||
import com.leekwars.generator.maps.Map; | ||
import com.leekwars.generator.state.Entity; | ||
|
||
public class AreaEnemies extends Area { | ||
|
||
public AreaEnemies(Attack attack) { | ||
super(attack); | ||
} | ||
|
||
@Override | ||
public List<Cell> getArea(Map map, Cell launchCell, Cell targetCell, Entity caster) { | ||
var cells = new ArrayList<Cell>(); | ||
if (caster != null) { | ||
for (var entity : map.getState().getEntities().values()) { | ||
if (entity.getCell() != null && entity.getTeam() != caster.getTeam()) { | ||
cells.add(entity.getCell()); | ||
} | ||
} | ||
} | ||
return cells; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.