StendhalRefactoringCreatures

From Arianne
Jump to navigation Jump to search

Creatures

List

Feel free to expand this list.
Please be original :)

Have a look to this: http://en.wikipedia.org/wiki/List_of_species_in_fantasy_fiction

Unsorted Additions

  • Angel
    • Archon
  • Ball Lightning
  • Balrog (implemented)
  • Bugbear
  • Cockatrice
  • Djinn - non-undead shapeshifting nocturnal spirit posessing free will (implemented)
  • Elementals
    • Air - Adept in the wind element (implemented)
    • Earth - Adept in the earth element (implemented)
    • Fire - Adept in the fire element (implemented)
    • Lightning - Adept in the wind element, but more powerful then the Air element
    • Water - Adept in the water/ice element (implemented)
  • Fire Ant
  • Gelatinous Cube - attempts to swallow you
  • Giant Mimic
  • Gnomes (implemented)
  • Homunculus - induces sleep
  • Killer Bee (implemented)
  • Ki-rin
  • Kraken
  • Leprechaun (implemented)
  • Marilith - female torso atop a snake body with multiple arms, intelligent
  • Mimic (implemented)
  • Naga (implemented)
  • Ogres (implemented)
  • Olog-hai
  • Trolls
  • Werewolf (implemented)

Animals

  • Boar (implemented)
  • Caverat (implemented)
  • Cobra (implemented)
  • Bear (black and normal one, implemented)
  • Giantrat (implemented)
  • Rat (implemented - several kind of rats including such as giant rat)
  • Wolf (implemented - big bad wolf (rare creature), normal wolf)
  • Dog
  • Cat (implemented - you can buy cats in Ados)
  • Sheep (implemented)
  • Deer (implemented)

Added Animals

  • Bat
    • Vampire Bat
  • Carnivorous Ape
  • Centaur
  • Crocodile
  • Fox
  • Griffin
  • Hell Hound
  • Leocrotta
  • Mastodon
  • Minotaur
  • Nightmare
  • Pyrolisk
  • Salamander
  • Stymphalian Birds
  • Unicorn

Beholders

  • Beholder
  • Elder Beholder

Dragon

  • Red Dragon - attacks with fire
  • Green Dragon - attacks with poison
  • Blue Dragon - attacks with lightning or water
  • White Dragon - attacks with cold
  • Black Dragon - attacks with death

Added Dragons

  • Gray Dragon - attacks with magic
  • Hydra - attacks with multiple heads
  • Jabberwock
  • Leviathan - demonic dragon, confined to water
  • Orange Dragon - attempts to make prey sleep
  • Prismatic Dragon - attacks with all elements
  • Yellow Dragon - attacks with acid

Dwarves

  • Dwarf
  • Dwarf Warrior
  • Dwarf Veteran
  • Dwarf Leader

Elves

  • Elf
  • Elf Hunter
  • Elf Warrior
  • Elf Veteran
  • Elf Leader
  • Drow
  • Drow Hunter
  • Drow Warrior
  • Drow Veteran
  • Drow Leader

Gargoyle

  • Gargoyle

Giants

  • ogre (added)
  • hill giants
  • cyclops (added)
  • giant cyclops
  • mountain giants
  • fire giants
  • ice giants (added)

Added Giants

  • Ettin - two-headed
  • Storm Giant

Goblin

  • goblin (added)
  • veteran goblin (added)
  • Goblin Chief

Added Goblins

  • Hobgoblin

Human

  • Bandit
  • Assassin
  • Hunter

Added Humans

  • Barbarian
  • Priest
  • Wizard
  • Soldier/Warrior

Kobold

  • kobold (added)
  • Kobold Hunter
  • Kobold Chief

Mohiko

  • black mohiko
  • red mohiko

Orcs

  • Orc
  • Orc Hunter
  • Orc Warrior
  • Orc Veteran
  • Orc Leader

Troll

  • Young Troll
  • Troll
  • Troll Veteran
  • Troll Chief

Undead

  • doom (higher level death)
  • ghost (added)
  • zombie (added)
  • Zombie Veteran
  • vampire (added)
  • lich (added)
  • mummy (added)
  • Skeletal Warrior (added: warrior skeleton)
  • Skeleton King

Added Undead

  • Jikininki - possible means of removing adventurer corpses'
  • Myling - possible quest creature
  • Will o' the Wisp
  • Wraith
    • Nazgul

Properties

We have several common attributes for all the creatures. Mainly:

  • Type
    This is going to be always creature
  • Class
    This is the main class. ie, elf, kobold, ...
  • Subclass
    This is the subclass, ie, elf warrior
  • XP value
    Value of the creature when killed
  • Attack
    Attack RP attribute
  • Defense
    Defense RP attribute
  • Dropped items
    • Item
    • Probability (0.0 - 1.0)
  • Slots
    • Capacity
  • Equiped items
    • Item
  • AI Behaviours

Art

The visual style of all creatures should have some consistency. Perhaps one or two people should be responsible for all creature design and drawing.

Extra information

Additionally creatures should explain:

  • tiled id
  • its name (ie for bosses)

Actions

  • Move
  • Stop
  • Chat
  • Tell
  • Outfit
  • Attack
  • Use
  • Use With
  • Equip
  • Drop
  • Own ( a sheep )

Events

I see two different approachs here:

  1. Active one, in the form of onAttack, that requieres something like
 Player.onAttack(target, weapon)
   {
   if(target is of type ghost)
     {
     return false;
     }
  
   return true;
   }
  1. Passive one, in the form of onAttacked
 Ghost.onAttacked(source, weapon)
   {
   return false;
   }

I think passive approach can lead to simpler more mantenible code. So I break the below list in those two categories.


Creatures can recieve the next list of events:

Passive way

boolean onAttacked(attacker, weapon)

called when attacked by someone with a given weapon.

void onStopAttacked(target)

called when target stops attacking us

boolean onDamage(type, amount)

called when entity is damaged with the damage type (physical, fire, poison, magical, ... ) and the amount of damage done.

boolean onKilled(attacker, weapon)

called when attacked killed us with the given weapon

boolean onMove(x,y)

called when entity moves to x,y ( before moving in fact )

boolean onCollidedWith(source)

called when entity collide with another entity

boolean onEquipped(source, slot)

called when entity is equipped on the source entity and in the given slot

boolean onDropped(source, x, y)

called when entity is dropped by source to floor at position x,y

void onChat(source, text)

called when someone speaks near entity or write to entity

boolean onUsed(source)

called when entity is used by source

boolean onUsedWith(source, base)

called when entity is used by source on base item

boolean onStop()

called when entity stops moving, attacking, etc...


Active way

boolean onAttack(target, weapon)

called when attacking a target with the given weapon.

void onStopAttack(target)

called when we stop attacking target

boolean onDamage(type, amount)

called when entity is damaged with the damage type (physical, fire, poison, magical, ... ) and the amount of damage done.

boolean onKill(target)

called when entity kills target

boolean onMove(x,y)

called when entity moves to x,y ( before moving in fact )

boolean onCollide(x,y)

called when entity collide at position x,y

boolean onCollideWith(target)

called when entity collide with another entity

boolean onEquip(item, slot)

called when entity equips item on the given slot

boolean onDrop(item, slot)

called when entity drops item from the given slot to floor

void onChat(source, text)

called when someone speaks near entity or write to entity

boolean onUse(item)

called when entity use item

boolean onUseWith(base, item)

called when entity use item on base item

boolean onStop()

called when entity stops moving, attacking, etc...

AI

Idea about AI is that it should be like a Lego. You use blocks to build a more complex figure. So AI should be based on small blocks of behaviour, each of them should be simple to do, and using that we can assign several profiles to the AI based on these behaviours.





Back to stendhal refactoring page
Back to Stendhal main wiki page