-
Notifications
You must be signed in to change notification settings - Fork 0
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
7 changed files
with
125 additions
and
0 deletions.
There are no files selected for viewing
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,26 @@ | ||
package be.bendem.bot.dices; | ||
|
||
import be.bendem.bot.entities.Entity; | ||
|
||
/** | ||
* @author bendem | ||
*/ | ||
public class AttackDice extends Dice { | ||
|
||
public AttackDice() { | ||
this(1, 6); | ||
} | ||
|
||
public AttackDice(int min, int max) { | ||
super(min, max, true); | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
@Override | ||
public void applyTo(Entity target, int result) { | ||
target.damage(result); | ||
} | ||
|
||
} |
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,26 @@ | ||
package be.bendem.bot.dices; | ||
|
||
import be.bendem.bot.entities.Entity; | ||
|
||
/** | ||
* @author bendem | ||
*/ | ||
public class HealDice extends Dice { | ||
|
||
public HealDice() { | ||
this(1, 6); | ||
} | ||
|
||
public HealDice(int min, int max) { | ||
super(min, max, false); | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
@Override | ||
public void applyTo(Entity target, int result) { | ||
target.heal(result); | ||
} | ||
|
||
} |
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 be.bendem.bot.dices; | ||
|
||
import be.bendem.bot.entities.Entity; | ||
|
||
/** | ||
* @author bendem | ||
*/ | ||
public class PoisonDice extends Dice { | ||
|
||
private final int damage; | ||
|
||
public PoisonDice(int damage) { | ||
this(damage, 1, 6); | ||
} | ||
|
||
protected PoisonDice(int damage, int min, int max) { | ||
super(min, max, true); | ||
this.damage = damage; | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
@Override | ||
public void applyTo(Entity target, int result) { | ||
target.poison(damage, result); | ||
} | ||
|
||
} |
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,21 @@ | ||
package be.bendem.bot.dices; | ||
|
||
import be.bendem.bot.entities.Entity; | ||
|
||
/** | ||
* @author bendem | ||
*/ | ||
public class ShieldDice extends Dice { | ||
|
||
public ShieldDice(int min, int max) { | ||
super(min, max, true); | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
@Override | ||
public void applyTo(Entity target, int result) { | ||
target.shield(result); | ||
} | ||
} |
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