From 1c9e85879864f88713c2f926027b556d0e677730 Mon Sep 17 00:00:00 2001 From: Collin Smith Date: Mon, 7 Sep 2020 01:35:34 -0700 Subject: [PATCH] Updated test with interleaved update sequences --- .../attributes/AttributesUpdaterTest.java | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/core/test/com/riiablo/attributes/AttributesUpdaterTest.java b/core/test/com/riiablo/attributes/AttributesUpdaterTest.java index 3a6dde30..449f8884 100644 --- a/core/test/com/riiablo/attributes/AttributesUpdaterTest.java +++ b/core/test/com/riiablo/attributes/AttributesUpdaterTest.java @@ -186,4 +186,31 @@ public class AttributesUpdaterTest { .apply(); dump(parent); } + + @Test + public void Tirant_Spirit_3() { + AttributesUpdater updater = newInstance(); + Attributes parent = Attributes.aggregateAttributes(); + Attributes tirant = genCharacterAttrs(Gdx.files.internal("test/Tirant.d2s").readBytes(), 0x2fd, 0x33); + UpdateSequence playerSequence = updater.update(parent, CharacterClass.SORCERESS.entry()).add(tirant.base()); + Attributes spirit = genItemAttrs(Gdx.files.internal("test/Spirit.d2i").readBytes(), 216, 0x19, FLAG_MAGIC | FLAG_RUNE); + Attributes tal = genGemAttrs("r07"); + Attributes thul = genGemAttrs("r10"); + Attributes ort = genGemAttrs("r09"); + Attributes amn = genGemAttrs("r11"); + UpdateSequence itemSequence = updater.update(spirit, FLAG_MAGIC | FLAG_RUNE, null, null); + updater.update(tal, 1 << GEM_SHIELD_LIST, null, null).apply(); + itemSequence.add(tal.remaining()); + updater.update(thul, 1 << GEM_SHIELD_LIST, null, null).apply(); + itemSequence.add(thul.remaining()); + updater.update(ort, 1 << GEM_SHIELD_LIST, null, null).apply(); + itemSequence.add(ort.remaining()); + updater.update(amn, 1 << GEM_SHIELD_LIST, null, null).apply(); + itemSequence.add(amn.remaining()); + itemSequence.apply(); +// dump(spirit); + + playerSequence.add(spirit.remaining()).apply(); + dump(parent); + } } \ No newline at end of file