In this challenge, you are going to create a Fellowship with the goal of defeating all other fellowships in battle.
A fellowship (team) consists of 3 characters. Each character moves independently of the rest of their team, but they will need to work together when fighting your enemy. Teams will face each other head to head in a rotating manner. Wins are worth 3 points, ties are worth 1 point, and losses are worth 0 points.
Characters have Abilities. The choice of what abilities your characters have is one of the most crucial (and fun) parts in this KotH. They are all strong, and have the potential to wipe out your enemy.
Characters have Health Points (HP), and when their HP hits (or goes below) 0, they die. If all characters on your opponent's team dies, then you win!
Characters have Mana. Most actions require Mana to perform, and if you don't have enough, that action is not available to you.
Characters have a Turn Delay. This determines the number of ticks between each turn (starts out at 100). Lower is better.
Characters have attributes. Each character has a base of 5 in each attribute, and you are given 20 additional attribute points to divide up. After assigning attribute points, your primary attribute is set as your highest attribute.
Available attributes are:
- Strength: Gives 10 Max HP and .5 HP per turn
- Intelligence: Gives 7 Max Mana and .1 Mana per turn
- Agility: Reduces Turn Delay by 1
Movement, Vision, Range
Ranges are as follows (centered around the 0). Some ranges are cardinal, which means that they can only go directly up, left, right, or down.
444 43334 4322234 432111234 432101234 432111234 4322234 43334 444
Characters have a starting vision of 2. Vision between players of the same fellowship is shared.
How to play
Players will construct their fellowship. You need to do the following steps:
Give each character attribute points. Each character starts out with 5 in each stat, with an additional 20 to distribute between the 3.
Give each character abilities. Each character starts out with 4 ability slots, and abilities take 1 slot by default. Some abilities are repeatable, and can be given to a character multiple times. Using an ability set of another submission without the owner's permission is not allowed.
Write some code for your bots. The code must be in Java, and will be used for battling (the next step)
All characters start with the 3 standard actions:
- Step: Move your character in a cardinal range of 1
- Slice: Attack an enemy for PrimaryAttribute in a cardinal range of 1
- Smile: Do nothing
On a characters' turn, then must pick an action to perform. Actions may have a Mana cost, and may have a Cooldown, which defines the number of turns you have to wait before performing that action again.
Every character has 4 ability slots. If an ability is in italics, it is an action.
Name Description Mana Cooldown Mobility Blink Move to a square, range 4 2 2 Swap Swap locations with Target 5 5 Teleport Move anywhere 20 5 Dash Increase the range of step by 1. Repeatable Mobile Step can move in any of the 8 directions Attacking Quick Slice twice 3 0 Weave Slice all visible enemies once 15 10 Absorb Each Slice steals 1 of your target's primary attribute. Lasts 20 turns Cleave Each Slice deals 1/2 damage to adjacent enemies Critital Adds a 30% chance for Slice to deal 200% damage. Repeatable Feast Each Slice increases your HP by 3. Repeatable Flexible Can Slice in any of the 8 directions Mana steal Slice steals 2 mana. Repeatable Reflexive Slice when sliced 0 3 Ranged Adds 1 to the range of Slice Swipe Each consecutive Slice on the same target deals 3 more damage than the last Statuses Dispel Removes all statuses from a Target. Range 2. 20 10 Duel Freezes you and your target until one of you dies. Range 1 25 0 Knockout You and target are stunned for the next 1000 ticks 10 10 Meteor All enemies are stunned for the next 100 ticks 25 10 Leash Target is frozen for their 2 next turns 4 6 Poison Poisons the enemy for 1 HP for 5 turns 5 0 Silence Target is silenced for 5 turns 5 7 Slow Target is slowed by 40 ticks for their next 3 turns 10 5 Stun Target is stunned for the next 300 ticks 10 10 Cold All other characters within 2 range are slowed by 10 ticks Immune No status can be applied to you Defensive Force Field Block next 5 sources of damage. Does not stack 15 5 Ghost For a turn, all damage heals 10 10 Heal Heal Target for 20 HP 10 3 Restore All units are restored back to full health 20 40 Shield You cannot be Sliced until your next turn 3 0 Evasive 25% chance for a Slice to not hit you. Repeatable Pillar Only can be sliced once a turn Resurrect When killed, come back to life with full HP (and no statuses) 0 40 Spikes When dealt damage, deal half of the damage back Vision Cloak Team becomes invisible for 5 turns 20 20 Hide You are invisible for 5 turns 4 7 Phase Become invisible for 1 turn 0 3 Track Target cannot go invisible, and takes 10% more damage. Lasts 10 turns. 5 5 Darkness Enemy sight range decreased by 1. Stacks, but cannot go below 1. Far sight Sight range increased by 2. Repeatable Invisible You are invisible if you start your turn out of enemy vision True sight Reveals all hidden units within range 2 at turn start Damage Drain Deals 5 damage to Target and heals self for 5 HP while they stay in 1 range 10 5 Lightning Deal 15 damage to all enemies 20 10 K/O Kills target if target is below 20% HP 20 0 Trap Place an invisible trap. Trap deals 15 damage when stepped on. Stacks. 10 2 Zap Deal 30 damage to target 30 5 Static Deals 5 damage every turn to all enemies within 1 range. Repeatable Stats Werewolf Add 10 to all stats for 5 turns 30 25 Buff Double your HP pool. Repeatable Clever Actions have 20% shorter cooldown. Repeatable Focused Increases your Mana regeration rate by Int/10. Repeatable Regenerate Increases your Regneration rate by Strength/2. Repeatable Smart Actions cost 2 less mana. Repeatable Strong You gain 10 attribute points. Repeatable Weak You lose 15 attribute points. You gain 2 ability slots (this takes one of them) Other Bear Can summon a bear which has 5 in each stat 8 10 Clone Clone yourself. Takes two ability slots. 100 100 Steal Replace this action with last action enemy Target used. Lasts 10 turns 5 0 Wall Create an impassible wall on targetted empty square, range 6 10 10
- Stun allows your character to only perform the Smile action, and lasts X ticks.
- Freeze prevents your character from moving, and lasts X turns.
- Silence prevents your character from performing anything besides Smile, Step, or Slice, and lasts X turns.
- Poison damages your character for X damage for Y turns. If you apply another poison, the damage adds together, and the duration is refreshed.
- Slow adds X to the number of ticks between your turns. It does not affect your upcoming turn, only turns after.
- Invisible makes it so you cannot be seen or damaged by your opponent. If you perform any action besides Step or Smile, it is removed. If your opponent has an ability that gives them vision of you, invisibility is removed.
All statuses (except for Poison) act independently of each other.
- If there's a tie for the primary attribute, it is resolved as STR > AGI > INT.
- You play on a 10x10 grid. Teams will be placed on opposite sides.
- Percentages stack multiplicatively, except for Clever.
You need to implement 2 functions:
// Create *exactly* 3 Character templates. You must return the same templates every time public List<CharacterTemplate> createCharacters(); // Choose an action for a character. If the action requires a target or location, it must be set. public ReadonlyAction choose(Set<ReadonlyAction> actions, ReadonlyCharacter character);
You'll also have access to three variables (member variables):
Set<ReadonlyCharacter> team; Set<EnemyCharacter> enemies; Map<Point2D, EnemyCharacter> visibleEnemies;
That's it. Below you can find a complete API, in alphabetical order:
class Ability and ReadonlyAbility int getNumSlots() returns the number of slots it takes up boolean repeatable() returns true if the ability can be repeated String name() class Action and ReadonlyAction Set<Point2D> availableLocations() Set<ReadonlyCharacter> availableTargets() boolean basicAction() returns true if the action is Smile, Step, or Slice boolean breaksInvisibiliby() int getCooldown() returns the cooldown cost (not the cooldown remaining) int getManaCost() String getName() int getRemainingCooldown() boolean isAvailable() returns true if the action can be performed boolean movementAction() returns true if the action is prevented when Frozen boolean needsLocation() boolean needsTarget() void setTarget(ReadonlyCharacter target) void setLocation(Point2D location) class CharacterTemplate void addAbility(Ability) boolean canAddAbility(Ability) List<Ability> currentAbilities() Map<Stat, Integer> currentAttributes() int getRemainingPoints() returns the total number of ability points you have left to assign int getRemainingSlots() returns the total number of slots you have to assign int getStat(Stat stat) boolean isValid() returns true if your character template is complete and valid class Point2D getX() getY() class Range boolean isCardinal() returns true if the range only extends in the 4 cardinal directions int getRange() returns the distance of the range class ReadonlyCharacter and EnemyCharacter Class characterClass() int cleverness() List<ReadonlyAbility> getAbilities() Point2D getLocation() Not on EnemyCharacter double getHealth() double getMana() int getMaxHealth() int getMaxMana() Range getSightRange() Range getSliceRange() int getStat(Stat stat) Range getStepRange() ReadonlyAction getLastAction() boolean isFrozen() boolean isStunned() boolean isPoisoned() int getPoisonAmount() boolean isSilenced() boolean isInvisible() boolean isDead() Stat primaryStat() int smartness() enum Stat INT, STR, AGI
The above is all of the functions you could possibly need for your submission. Reflection is not allowed. If a submission is invalid for whatever reason, please remove it or add "Invalid" to the header. Your submission should not have a package declaration. Your submission should be contained in the first multi-line code block, and the first line must have the file name.
How to run the project:
There are several ways:
- Download the JAR file, and run
java -jar Fellowship.jar. If you want to download other submissions, pass
javamust point to the JDK, not the JRE.
- Clone the git repo, and run
gradle run. You need to have gradle installed, and if you want to pass arguments, use
- Clone the git repo, and compile it yourself. You will need the following libraries:
If you clone you must use the
--recursive flag, and when you pull updates, include
--recurse-submodules For any of the above, your class needs to go in the
submissions/java folder. If you are using gradle, or compiling it yourself, you can put the class in the project itself. You will need to uncomment some lines in the main function, and update them to point to your class.
+------+-------------------+-------+ | Rank | Name | Score | +------+-------------------+-------+ | 1 | TheWalkingDead | 738.0 | | 2 | RogueSquad | 686.0 | | 3 | Spiky | 641.0 | | 4 | Invulnerables | 609.0 | | 5 | Noob | 581.0 | | 6 | Railbender | 561.0 | | 7 | Vampire | 524.0 | | 8 | LongSword | 508.0 | | 9 | SniperSquad | 456.0 | | 10 | BearCavalry | 430.0 | | 11 | StaticCloud | 429.0 | | 12 | PlayerWerewolf | 388.0 | | 13 | LongSwordv2 | 347.0 | | 14 | Derailer | 304.0 | | 15 | Sorcerer | 266.0 | | 16 | CowardlySniperMk2 | 262.0 | | 17 | TemplatePlayer | 59.0 | +------+-------------------+-------+
If you have any questions, or need help, comment below, or join the chatroom! Good luck and have fun