Class DeathMatchCreature

All Implemented Interfaces:
Killer, Cloneable, Iterable<String>, Serializable

public class DeathMatchCreature extends Creature

A creature that will give no XP to killers.

It calculates the DM score (points) due to the DM starter.

All players who did damage get the kill attributed.

Author:
hendrik
  • Constructor Details

    • DeathMatchCreature

      public DeathMatchCreature(DeathmatchInfo deathmatchInfo)
    • DeathMatchCreature

      public DeathMatchCreature(Creature copy, DeathmatchInfo deathmatchInfo)
      DeathCreature.
      Parameters:
      copy - creature to wrap
  • Method Details

    • setPlayerToReward

      public void setPlayerToReward(Player player)
      Only this player gets a points reward.
      Parameters:
      player - Player to reward
    • getNewInstance

      public Creature getNewInstance()
      Description copied from class: Creature
      creates a new instance, using this creature as template
      Overrides:
      getNewInstance in class Creature
      Returns:
      a new creature
    • rewardKillers

      protected void rewardKillers(int oldXP)
      Description copied from class: RPEntity
      Gives XP to every player who has helped killing this RPEntity.
      Overrides:
      rewardKillers in class RPEntity
      Parameters:
      oldXP - The XP that this RPEntity had before being killed.
    • getDMPoints

      public int getDMPoints()
      Calculates the deathmatch points for this kill.
      Returns:
      number of points to reward