StendhalRefactoring: Difference between revisions

Jump to navigation Jump to search
Content deleted Content added
imported>MiguelAngelBlanchLardin
No edit summary
imported>MiguelAngelBlanchLardin
No edit summary
Line 1: Line 1:
=Items=
=Items=
==List==
We have the next items structure:
We have the next items structure:
* Shields
===Shields===
** Wooden shield
* Wooden shield
** Studded shield
* Studded shield
** Metal Plate shield
* Metal Plate shield
** Copper shield
* Copper shield
* Swords
===Swords===
** Dagger
* Dagger
** Sword
* Sword
** Long sword
* Long sword
** Broadsword
* Broadsword
* Armors
===Armors===
** Leather armor
* Leather armor
** Studded Leather armor
* Studded Leather armor
** Plate Mail armor
* Plate Mail armor
** Copper Plate armor
* Copper Plate armor
* Boots
===Boots===
** Sandals
* Sandals
** Leather
* Leather
* Helmet
===Helmet===
** Leather helmet
* Leather helmet
** Studded helmet
* Studded helmet
** Chain Mail helmet
* Chain Mail helmet
** Viking helmet
* Viking helmet
* Leg Armour
===Leg Armour===
** Leather Leg Armour
* Leather Leg Armour
** Studded Leather Leg Armour
* Studded Leather Leg Armour
** Chain Mail Leg Armour
* Chain Mail Leg Armour
* Corpse
===Corpse===
* Money
===Money===
* Book
===Book===
* Food
===Food===
** Meat
* Meat
** Cheese
* Cheese
** Bread
* Bread


== Properties ==
== Properties ==
Line 50: Line 51:
Additionally items should explain:
Additionally items should explain:
* What slots can they be equipped
* What slots can they be equipped
* tiled id




=Creatures=
=Creatures=
==List==

== Actions ==
== Actions ==
* Move
* Move
Line 67: Line 71:
== Events ==
== Events ==
Creatures can recieve the next list of events:
Creatures can recieve the next list of events:
* boolean onAttack(target, weapon)<br>''called when attacking a target with the given weapon.''
=== boolean onAttack(target, weapon)===
* boolean onAttacked(attacker, weapon)<br>''called when attacked by someone with a given weapon.''
''called when attacking a target with the given weapon.''
===boolean onAttacked(attacker, weapon)===
* void onStopAttack(target)<br>''called when we stop attacking target''
''called when attacked by someone with a given weapon.''
* void onStopAttacked(target)<br>''called when target stops attacking us''
===void onStopAttack(target)===
* boolean onDamage(type, amount)<br>''called when entity is damaged with the damage type (physical, fire, poison, magical, ... ) and the amount of damage done.''
''called when we stop attacking target''
* boolean onKilled(attacker, weapon)<br>''called when attacked killed us with the given weapon''
===void onStopAttacked(target)===
* boolean onKill(target)<br>''called when entity kills target''
''called when target stops attacking us''
* boolean onMove(x,y)<br>''called when entity moves to x,y ( before moving in fact )''
===boolean onDamage(type, amount)===
* boolean onCollide(x,y)<br>''called when entity collide at position x,y''
''called when entity is damaged with the damage type (physical, fire, poison, magical, ... ) and the amount of damage done.''
* boolean onCollideWith(target)<br>''called when entity collide with another entity''
===boolean onKilled(attacker, weapon)===
* boolean onEquip(item, slot)<br>''called when entity equips item on the given slot''
* boolean onEquipped(source, slot)<br>''called when entity is equipped on the source entity and in the given slot''
''called when attacked killed us with the given weapon''
===boolean onKill(target)===
* boolean onDrop(item, slot)<br>''called when entity drops item from the given slot to floor''
* boolean onDropped(source, x, y)<br>''called when entity is dropped by source to floor at position x,y''
''called when entity kills target''
===boolean onMove(x,y)===
* void onChat(source, text)<br>''called when someone speaks near entity or write to entity''
* boolean onUse(item)<br>''called when entity use item''
''called when entity moves to x,y ( before moving in fact )''
===boolean onCollide(x,y)===
* boolean onUseWith(base, item)<br>''called when entity use item on base item''
* boolean onUsed(source)<br>''called when entity is used by source''
''called when entity collide at position x,y''
===boolean onCollideWith(target)===
* boolean onUsedWith(source, base)<br>''called when entity is used by source on base item''
* boolean onStop()<br>''called when entity stops moving, attacking, etc...''
''called when entity collide with another entity''
===boolean onEquip(item, slot)===
''called when entity equips item on the given slot''
===boolean onEquipped(source, slot)===
''called when entity is equipped on the source entity and in the given slot''
===boolean onDrop(item, slot)===
''called when entity drops item from the given slot to floor''
===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 onUse(item)===
''called when entity use item''
===boolean onUseWith(base, item)===
''called when entity use item on base item''
===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...''