feat: add thanos into the handling

This commit is contained in:
2021-05-31 22:54:13 +02:00
parent 1ba5410fd6
commit 9a9fe4ae97
6 changed files with 90 additions and 49 deletions

View File

@ -62,8 +62,7 @@ class EventBuilderTest {
25),
new NPC(
new EntityID(EntityType.NPC, 1),
new IntVector2(11, 14),
new ArrayList<>()
new IntVector2(11, 14)
)
};

View File

@ -4,9 +4,7 @@ import net.jqwik.api.*;
import org.junit.jupiter.api.Test;
import uulm.teamname.marvelous.gamelibrary.IntVector2;
import uulm.teamname.marvelous.gamelibrary.entities.*;
import uulm.teamname.marvelous.gamelibrary.entities.Character;
import uulm.teamname.marvelous.gamelibrary.events.Event;
import uulm.teamname.marvelous.gamelibrary.events.EventBuilder;
import uulm.teamname.marvelous.gamelibrary.json.config.CharacterConfig;
import uulm.teamname.marvelous.gamelibrary.json.config.PartyConfig;
import uulm.teamname.marvelous.gamelibrary.json.config.ScenarioConfig;
@ -14,10 +12,6 @@ import uulm.teamname.marvelous.gamelibrary.requests.*;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ThreadLocalRandom;
import static org.assertj.core.api.Assertions.*;
import static org.junit.jupiter.api.Assertions.*;
class GameLogicTest {
@ -85,7 +79,7 @@ class GameLogicTest {
.as(Stat::new);
return Combinators.combine(stats, Arbitraries.integers().greaterOrEqual(0))
.as((stat, decrease) -> {
stat.decreaseValue(decrease % (stat.max + 1));
stat.decreaseValue(decrease % (stat.getMax() + 1));
return stat;
});
}