StendhalDesign: Difference between revisions

Content deleted Content added
imported>MiguelAngelBlanchLardin
No edit summary
imported>MiguelAngelBlanchLardin
Line 26:
It is split in to 4 different areas to test the multizones feature of Arianne.<br>
Players need to change zone in order to accomplish their task.
 
Our world is made of several entities: players, wolves, rats, sheeps, NPC. By describing each entity with use cases we will simplify later the coding stage.
 
== Use cases description ==
We need to use several use cases to describe our game.
 
===Player's user case===
Player is an entity that play the game, it can move, chat, attack, heal.
Line 95 ⟶ 98:
If listen "Sell Sheep" from Player:
Estimate Sheep value related to Sheep weight
Seller says "Do you want to sell buy ayour Sheep for <estimated price> coins?"
If listen "yes" from Player:
set Player money=Player money + <estimated price>
set Player XP=Player XP + 100 * Sheep Weight / 100
Destroy Sheep
Line 132 ⟶ 136:
Wolf attacks Attacker
</pre>
 
===Rat's user case===
Rat and Cave rats are creatures that will attack player to make it harder to grow the sheep up.
<pre>
Rat moves
If Rat sees Player:
Rat attacks Player
If Rat is attacked:
Rat attacks Attacker
</pre>
 
 
 
Line 140 ⟶ 156:
* Sheep buyer
* Wolf
* Rat
* Cave rat
* Player
* Food
Line 154 ⟶ 172:
* <b>dy</b> is the y-speed of the sheep
* <b>hp</b> is the life indicator of the sheep, when it reach 0 the sheep dies.
* <b>atk</b> is the RP attack value. See [[StendhalDesign#RP|RP rules]]
* <b>def</b> is the RP defense value. See [[StendhalDesign#RP|RP rules]]
* <b>xp</b> is the RP experience value. See [[StendhalDesign#RP|RP rules]]
* <b>weight</b> is the weight indicator of the sheep, the more weight, the more expensive it is.
 
Line 162 ⟶ 183:
The sheeps behaviour is mainly to follow its owner and look for food.<br>
If the Sheep finds food, it will eat.<br>
Sheep will runaway if attacked by wolves.<br>
 
=== Creatures: Wolf, rat and Cave rat ===
Wolves, rats and cave rats have the following set of attributes:
* <b>x</b> is the x-position of the wolf
* <b>y</b> is the y-position of the wolf
Line 172 ⟶ 193:
* <b>hp</b> is the life indicator of the wolf, when it reach 0 the wolf dies.
* <b>atk</b> is the RP attack value. See [[StendhalDesign#RP|RP rules]]
* <b>def</b> is the RP defense value. See [[StendhalDesign#RP|RP rules]]
* <b>xp</b> is the RP experience value. See [[StendhalDesign#RP|RP rules]]
 
Wolf ( and rat and cave rat ) tasks should be:
* <b>follow</b> means that wolf follows an object using the shortest way to reach it.
* <b>attack</b> means that wolf will try to damage the attacked object until its hp reach 0<br>Another action will cancel attack task.
Line 179 ⟶ 202:
* <b>chat</b> means that wolf will start to shout 'auuuuuuu!'. Wolves will often understand this as a call.
 
Wolf ( and rat and cave rat ) behaviour consists of patrolling some assigned areas.<br>
If the Wolf finds a Sheep, it will attack Sheep.<br>
If the Wolf finds a Player, it will attack player.<br>
If the Wolf is attacked, the Wolf returns the attacks.<br>
If the Wolf is severly injured, the Wolf will runaway.<br>
 
=== Sheep seller and, Sheep buyer, Beggar ===
The buyer and seller have the following set of attributes:
* <b>x</b> is the x-position of the NPC
Line 190 ⟶ 214:
* <b>dx</b> is the x-speed of the NPC
* <b>dy</b> is the y-speed of the NPC
* <b>hp</b> is the life indicator of the NPC, when it reach 0 it is reset back to full.
* <b>atk</b> is the RP attack value. See [[StendhalDesign#RP|RP rules]]
* <b>def</b> is the RP defense value. See [[StendhalDesign#RP|RP rules]]
* <b>xp</b> is the RP experience value. See [[StendhalDesign#RP|RP rules]]
* <b>attending</b> is the object_id of the player that is actually attending.
 
seller, buyer and buyerbeggar tasks would be:
* <b>patrol</b> means that NPC will move around a specified path.
 
Line 204 ⟶ 232:
* <b>dx</b> is the x-speed of the player
* <b>dy</b> is the y-speed of the player
* <b>hp</b> is the life indicator of the playerPlayer, when it reach 0 the sheepplayer dies. See [[StendhalDesign#RP Dead]]
* <b>atk</b> is the RP attack value. See [[StendhalDesign#RP|RP rules]]
* <b>expdef</b> is the experienceRP ofdefense the playervalue. See [[StendhalDesign#RP|RP rules]]
* <b>xp</b> is the RP experience value. See [[StendhalDesign#RP|RP rules]]
* <b>money</b> is the quantity of money the player has.
 
Line 214 ⟶ 243:
* right hand
* backpack
* flock
 
Player tasks should be: