StendhalDesign: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
imported>MiguelAngelBlanchLardin No edit summary |
imported>MiguelAngelBlanchLardin |
||
| Line 26: | Line 26: | ||
It is split in to 4 different areas to test the multizones feature of Arianne.<br> |
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. |
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 == |
== Use cases description == |
||
We need to use several use cases to describe our game. |
We need to use several use cases to describe our game. |
||
===Player's user case=== |
===Player's user case=== |
||
Player is an entity that play the game, it can move, chat, attack, heal. |
Player is an entity that play the game, it can move, chat, attack, heal. |
||
| Line 95: | Line 98: | ||
If listen "Sell Sheep" from Player: |
If listen "Sell Sheep" from Player: |
||
Estimate Sheep value related to Sheep weight |
Estimate Sheep value related to Sheep weight |
||
Seller says "Do you want to sell |
Seller says "Do you want to sell your Sheep for <estimated price> coins?" |
||
If listen "yes" from Player: |
If listen "yes" from Player: |
||
set Player money=Player money + <estimated price> |
set Player money=Player money + <estimated price> |
||
set Player XP=Player XP + 100 * Sheep Weight / 100 |
|||
Destroy Sheep |
Destroy Sheep |
||
| Line 132: | Line 136: | ||
Wolf attacks Attacker |
Wolf attacks Attacker |
||
</pre> |
</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: | Line 156: | ||
* Sheep buyer |
* Sheep buyer |
||
* Wolf |
* Wolf |
||
* Rat |
|||
* Cave rat |
|||
* Player |
* Player |
||
* Food |
* Food |
||
| Line 154: | Line 172: | ||
* <b>dy</b> is the y-speed of the sheep |
* <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>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. |
* <b>weight</b> is the weight indicator of the sheep, the more weight, the more expensive it is. |
||
| Line 162: | Line 183: | ||
The sheeps behaviour is mainly to follow its owner and look for food.<br> |
The sheeps behaviour is mainly to follow its owner and look for food.<br> |
||
If the Sheep finds food, it will eat.<br> |
If the Sheep finds food, it will eat.<br> |
||
Sheep will runaway if attacked |
Sheep will runaway if attacked.<br> |
||
=== Wolf === |
=== Creatures: Wolf, rat and Cave rat === |
||
Wolves have the following set of attributes: |
Wolves, rats and cave rats have the following set of attributes: |
||
* <b>x</b> is the x-position of the wolf |
* <b>x</b> is the x-position of the wolf |
||
* <b>y</b> is the y-position of the wolf |
* <b>y</b> is the y-position of the wolf |
||
| Line 172: | Line 193: | ||
* <b>hp</b> is the life indicator of the wolf, when it reach 0 the wolf dies. |
* <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>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 tasks should be: |
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>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. |
* <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: | Line 202: | ||
* <b>chat</b> means that wolf will start to shout 'auuuuuuu!'. Wolves will often understand this as a call. |
* <b>chat</b> means that wolf will start to shout 'auuuuuuu!'. Wolves will often understand this as a call. |
||
Wolf behaviour consists of patrolling some assigned areas.<br> |
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 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 attacked, the Wolf returns the attacks.<br> |
||
If the Wolf is injured, the Wolf will runaway.<br> |
If the Wolf is severly injured, the Wolf will runaway.<br> |
||
=== Sheep seller |
=== Sheep seller, Sheep buyer, Beggar === |
||
The buyer and seller have the following set of attributes: |
The buyer and seller have the following set of attributes: |
||
* <b>x</b> is the x-position of the NPC |
* <b>x</b> is the x-position of the NPC |
||
| Line 190: | Line 214: | ||
* <b>dx</b> is the x-speed of the NPC |
* <b>dx</b> is the x-speed of the NPC |
||
* <b>dy</b> is the y-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. |
* <b>attending</b> is the object_id of the player that is actually attending. |
||
seller and |
seller, buyer and beggar tasks would be: |
||
* <b>patrol</b> means that NPC will move around a specified path. |
* <b>patrol</b> means that NPC will move around a specified path. |
||
| Line 204: | Line 232: | ||
* <b>dx</b> is the x-speed of the player |
* <b>dx</b> is the x-speed of the player |
||
* <b>dy</b> is the y-speed of the player |
* <b>dy</b> is the y-speed of the player |
||
* <b>hp</b> is the life indicator of the |
* <b>hp</b> is the life indicator of the Player, when it reach 0 the player dies. See [[StendhalDesign#RP Dead]] |
||
* <b>atk</b> is the RP attack value. See [[StendhalDesign#RP|RP rules]] |
* <b>atk</b> is the RP attack value. See [[StendhalDesign#RP|RP rules]] |
||
* <b> |
* <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>money</b> is the quantity of money the player has. |
* <b>money</b> is the quantity of money the player has. |
||
| Line 214: | Line 243: | ||
* right hand |
* right hand |
||
* backpack |
* backpack |
||
* flock |
|||
Player tasks should be: |
Player tasks should be: |
||