timers: add divine bastion and battlemage potions
This commit is contained in:
@@ -76,6 +76,8 @@ enum GameTimer
|
|||||||
DIVINE_SUPER_COMBAT(ItemID.DIVINE_SUPER_COMBAT_POTION4, GameTimerImageType.ITEM, "Divine Super Combat", 5, ChronoUnit.MINUTES),
|
DIVINE_SUPER_COMBAT(ItemID.DIVINE_SUPER_COMBAT_POTION4, GameTimerImageType.ITEM, "Divine Super Combat", 5, ChronoUnit.MINUTES),
|
||||||
DIVINE_RANGING(ItemID.DIVINE_RANGING_POTION4, GameTimerImageType.ITEM, "Divine Ranging", 5, ChronoUnit.MINUTES),
|
DIVINE_RANGING(ItemID.DIVINE_RANGING_POTION4, GameTimerImageType.ITEM, "Divine Ranging", 5, ChronoUnit.MINUTES),
|
||||||
DIVINE_MAGIC(ItemID.DIVINE_MAGIC_POTION4, GameTimerImageType.ITEM, "Divine Magic", 5, ChronoUnit.MINUTES),
|
DIVINE_MAGIC(ItemID.DIVINE_MAGIC_POTION4, GameTimerImageType.ITEM, "Divine Magic", 5, ChronoUnit.MINUTES),
|
||||||
|
DIVINE_BASTION(ItemID.DIVINE_BASTION_POTION4, GameTimerImageType.ITEM, "Divine Bastion", 5, ChronoUnit.MINUTES),
|
||||||
|
DIVINE_BATTLEMAGE(ItemID.DIVINE_BATTLEMAGE_POTION4, GameTimerImageType.ITEM, "Divine Battlemage", 5, ChronoUnit.MINUTES),
|
||||||
ANTIPOISON(ItemID.ANTIPOISON4, GameTimerImageType.ITEM, "Antipoison"),
|
ANTIPOISON(ItemID.ANTIPOISON4, GameTimerImageType.ITEM, "Antipoison"),
|
||||||
ANTIVENOM(ItemID.ANTIVENOM4, GameTimerImageType.ITEM, "Anti-venom");
|
ANTIVENOM(ItemID.ANTIVENOM4, GameTimerImageType.ITEM, "Anti-venom");
|
||||||
|
|
||||||
|
|||||||
@@ -615,6 +615,14 @@ public class TimersPlugin extends Plugin
|
|||||||
case "magic":
|
case "magic":
|
||||||
createGameTimer(DIVINE_MAGIC);
|
createGameTimer(DIVINE_MAGIC);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case "bastion":
|
||||||
|
createGameTimer(DIVINE_BASTION);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "battlemage":
|
||||||
|
createGameTimer(DIVINE_BATTLEMAGE);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -136,4 +136,30 @@ public class TimersPluginTest
|
|||||||
TimerTimer infoBox = (TimerTimer) captor.getValue();
|
TimerTimer infoBox = (TimerTimer) captor.getValue();
|
||||||
assertEquals(GameTimer.DMM_FULLTB, infoBox.getTimer());
|
assertEquals(GameTimer.DMM_FULLTB, infoBox.getTimer());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testDivineBastion()
|
||||||
|
{
|
||||||
|
when(timersConfig.showDivine()).thenReturn(true);
|
||||||
|
ChatMessage chatMessage = new ChatMessage(null, ChatMessageType.SPAM, "", "You drink some of your divine bastion potion.", "", 0);
|
||||||
|
timersPlugin.onChatMessage(chatMessage);
|
||||||
|
|
||||||
|
ArgumentCaptor<InfoBox> captor = ArgumentCaptor.forClass(InfoBox.class);
|
||||||
|
verify(infoBoxManager).addInfoBox(captor.capture());
|
||||||
|
TimerTimer infoBox = (TimerTimer) captor.getValue();
|
||||||
|
assertEquals(GameTimer.DIVINE_BASTION, infoBox.getTimer());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testDivineBattlemage()
|
||||||
|
{
|
||||||
|
when(timersConfig.showDivine()).thenReturn(true);
|
||||||
|
ChatMessage chatMessage = new ChatMessage(null, ChatMessageType.SPAM, "", "You drink some of your divine battlemage potion.", "", 0);
|
||||||
|
timersPlugin.onChatMessage(chatMessage);
|
||||||
|
|
||||||
|
ArgumentCaptor<InfoBox> captor = ArgumentCaptor.forClass(InfoBox.class);
|
||||||
|
verify(infoBoxManager).addInfoBox(captor.capture());
|
||||||
|
TimerTimer infoBox = (TimerTimer) captor.getValue();
|
||||||
|
assertEquals(GameTimer.DIVINE_BATTLEMAGE, infoBox.getTimer());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user