StendhalDesign: Difference between revisions

Content deleted Content added
No edit summary
Replaced pig by sheep
Line 4:
 
= Plot =
Stendhal's plot is to grow pigsSheeps by taking them with you to eat on the plains or the forest.<br>
The task is not simple because you will have to look after them because hungry wolves will try to eat your pigSheep. So be careful and protect your pigSheep.
 
PigsSheeps must be bought when small at Farm, and sell later when you grow it at the Village. For each pigSheep you sell when it has grow up, you will get an extra income.
 
You will need to spend money on getting new weapons and armors and healing potions.
Line 32:
* Player enter village in entry point
* Player moves to Farm zone
* Player talks with pigSheep seller
<pre>
Player: Hi
Seller: Greetings! How may I help you?
Player: buy pigSheep
Seller: Do you want to buy a pigSheep for 50 coins?
Player: yes
Seller: Thank you! Bye
</pre>
* Player moves. PigSheep follows Player.
* Player moves to plains
* Player moves around looking for food
* Player protect pigSheep of wolves attacks
* When pigSheep is big enough Player moves to Village
* Player talks with pigSheep buyer
<pre>
Player: Hi
Buyer: Greetings! How may I help you?
Player: sell pigSheep
Buyer: Do you want to sell this pigSheep for 73 coins?
Player: yes
Buyer: Thank you! Bye
</pre>
* Player spend money in new pigSheep and equipment
*# Armor
*# Weapon
*# Healing potions
 
===PigSheep seller's user case===
FOREVER do:
* Listen to Player
* If listen "Hi":
** Seller says "Greetings <Player>!"
* If listen "Buy pigSheep" from Player:
** Seller says "Do you want to buy a pigSheep for 50 coins?"
* If listen "yes" from Player:
** If Player money - 50 > 0:
*** set Player money=Player money - 50
*** Duplicate PigSheep
*** Make PigSheep follows Player
* Say bye to Player
DONE
 
===PigSheep buyer's user case===
FOREVER do:
* Listen to Player
* If listen "Hi":
** Seller says "Greetings <Player>!"
* If listen "Sell pigSheep" from Player:
** Estimate pigSheep value related to PigSheep weight
** Seller says "Do you want to sell buy a pigSheep for <estimated price> coins?"
* If listen "yes" from Player:
** set Player money=Player money + <estimated price>
** Destroy PigSheep
* Say bye to Player
DONE
 
===PigSheep's user case===
* PigSheep is in Farm
* Player buys PigSheep
* PigSheep seller duplicates PigSheep
* PigSheep follows Player
* If PigSheep finds food:
** PigSheep moves to food
** PigSheep eats food
** PigSheep gains weight
* Player sells PigSheep
* PigSheep dissappear
 
===Wolf's user case===
* Wolf moves
* If Wolf sees PigSheep:
** Wolf attacks PigSheep
* If Wolf is attacked:
** Wolf attacks Attacker
Line 110:
== Entities ==
The above user cases shows the next entities in our system:
* PigSheep
* PigSheep seller
* PigSheep buyer
* Wolf
* Player
Line 121:
 
Let's describe each entity with its attributes and actions related.
=== PigSheep ===
It has the following set of attributes:
* x
Line 131:
* weight
 
PigSheep tasks would be:
* follow
* eat
 
PigSheep behaviour is mainly to follow owner and look for food.<br>
If PigSheep finds food, it will eat.<br>
PigSheep will runaway if it is attacked by wolves.<br>
 
=== Wolf ===
Line 155:
 
Wolf behaviour consists in patrolling some assigned areas.<br>
If Wolf finds PigSheep, it will attack PigSheep.<br>
If Wolf is attacked, Wolf attacks.<br>
If Wolf is injured, Wolf will runaway.<br>
 
=== PigSheep seller and PigSheep buyer ===
It has the following set of attributes:
* x
Line 181:
* hp
* atk
* pigSheep
* money