Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
My first real QB64PE game is up.
#11
I am translating all the strings to English at the moment. The game will be available in English soon. It will be easier for everyone to check it out Smile
Reply
#12
The game has now been translated into English as well and the Itch.io page has been updated.
I am sharing the code here if you want to compile it yourself.
I suggest placing the images and sounds in the same folder for the best experience.
Here it goes! Any feedback is welcome! :

Code: (Select All)

_FULLSCREEN
_title "Survival on a desert island"
screen _newimage (1920, 1080, 32)
$color:32
randomize TIMER
'start introduction
sleep
_delay 1
thunder& = _SNDOPEN("thunder.mp3")
_SNDPLAY thunder& 
rain& = _SNDOPEN("rain.mp3")
_SNDPLAY rain&
locate 32,95
print "    Your monohull has been struck by lightning"
_delay 1
locate 32,95
print "    Your monohull has been struck by lightning."
_Delay 1
locate 32,95
print "    Your monohull has been struck by lightning.."
_Delay 1
locate 32,95
print "    Your monohull has been struck by lightning..."
_Delay 1
'start fading
Color LightGray
locate 32,95
print "    Your monohull has been struck by lightning..."
_Delay .4
Color DarkGray
locate 32,95
print "    Your monohull has been struck by lightning..."
_Delay .4
Color DimGray
locate 32,95
print "    Your monohull has been struck by lightning..."
_Delay .4
Color Black
locate 32,95
print "    Your monohull has been struck by lightning..."
_Delay .5
_delay 1.2
Color White 'back to white
bird& = _SNDOPEN("bird.mp3")
_SNDPLAY bird&
cls
locate 32,95
print "      You wake up on an island in the morning"
_delay 1
locate 32,95
print "      You wake up on an island in the morning."
_Delay 1
locate 32,95
print "      You wake up on an island in the morning.."
_Delay 1
locate 32,95
print "      You wake up on an island in the morning..."
_Delay 1
'debut some fondu
Color LightGray
locate 32,95
print "      You wake up on an island in the morning..."
_Delay .4
Color DarkGray
locate 32,95
print "      You wake up on an island in the morning..."
_Delay .4
Color DimGray
locate 32,95
print "      You wake up on an island in the morning..."
_Delay .4
Color Black
locate 32,95
print "      You wake up on an island in the morning..."
_Delay .5
_delay 1
Color White 'back to white
'end introduction

DIM mainaction(40) AS STRING
DIM gather(50) AS String
dim build (50) as STRING
dim craft (50) as string
dim tools (50) as STRING
DIM mainlocation (20) as string
DIM meadows (10) as string: DIM hills (10) as string: DIM jungles (10) as string: DIM mountains (10) as string: DIM beaches (10) as string
DIM deserts (10) as string: DIM volcanoes (10) as string: DIM caves (20) as string: DIM cliffs (20) as string
dim enemy (50) as string
dim herbs (20) AS STRING
dim medicine (30) AS STRING
DIM armors (30) as string

DIM shared food as INTEGER: DIM shared hunger as integer: DIM shared water as INTEGER: DIM shared thirst as INTEGER: DIM shared energy as INTEGER
DIM shared day as INTEGER: DIM hour AS INTEGER
DIM shared warmth as integer : DIM shared health as INTEGER: dim shared hygiene as integer
DIM selectedItem AS INTEGER
DIM menuItems(100) AS STRING
dim bone as integer: dim sand as integer
dim kokiyas as integer: dim leaf as integer: dim vine as integer: Dim leavescollected as integer: DIM bonescollected as integer: DIM rockcollected as integer: dim flintcollected as integer: DIM foodcollected as INTEGER: DIM claycollected as integer
dim rosehip as integer
dim wood as integer: dim plant as integer: DIM snakevenom AS INTEGER

Dim shared playername as STRING
dim shared damage as integer
dim shared defense as integer

DIM Shared equipmentInstance As equipment

Type equipment
    equipmentname As String
    equipmentdamage As Integer
    equipmentdefense As Integer
    equipmentdurability As Integer
equipmentcount AS INTEGER
End Type

dim shared healthstatus as string
healthstatus = "Normal"
dim abscess as INTEGER
DIM sorethroat as integer
DIM asthma as integer
DIM bronchitis as integer
DIM diarrhea as integer
DIM fever as integer
DIM flu as integer
DIM infection as integer
DIM commoncold as integer
DIM conjunctivitis as integer
DIM lightpoison as integer
DIM deadlypoison as integer
'base combat stats
playername = ""
damage = 2
defense = 0
health = 100
damagetaken = 0
'squirrel
dim squirrelname as string
dim squirreldamage as integer
dim squirreldefense as integer
dim squirrelhealth as integer
squirrelname = "Squirrel"
squirreldamage = 2
squirreldefense = 0
squirrelhealth = 6
'rabbit
dim rabbitname as string
dim rabbitdamage as integer
dim rabbitdefense as integer
dim rabbithealth as integer
rabbitname = "Rabbit"
rabbitdamage = 2
rabbitdefense = 0
rabbithealth = 6
'crab
dim crabname as string
dim crabdamage as integer
dim crabdefense as integer
dim crabhealth as integer
crabname = "Crab"
crabdamage = 3
crabdefense = 1
crabhealth = 6
'lizard
dim lizardname as string
dim lizarddamage as integer
dim lizarddefense as integer
dim lizardhealth as integer
lizardname = "Agressive lizard"
lizarddamage = 3
lizarddefense = 1
lizardhealth = 16
'wild chicken
dim chickenname as string
dim chickendamage as integer
dim chickendefense as integer
dim chickenhealth as integer
chickenname = "Wild chicken"
chickendamage = 2
chickendefense = 1
chickenhealth = 4
'fox
dim foxname as string
dim foxdamage as integer
dim foxdefense as integer
dim foxhealth as integer
foxname = "Fox"
foxdamage = 4
foxdefense = 3
foxhealth = 12
'vulture
dim vulturename as string
dim vulturedamage as integer
dim vulturedefense as integer
dim vulturehealth as integer
vulturename = "Vulture"
vulturedamage = 2
vulturedefense = 1
vulturehealth = 9
'snake
dim snakename as string
dim snakedamage as integer
dim snakedefense as integer
dim snakehealth as integer
snakename = "Venomous snake"
snakedamage = 5
snakedefense = 3
snakehealth = 15

'mosquito (non-huntable)
dim mosquitoname as string
dim mosquitodamage as integer
dim mosquitodefense as integer
dim mosquitohealth as integer
mosquitoname = "Mosquito"
mosquitodamage = 1
mosquitodefense = 0
mosquitohealth = 1

'armes/outils craft‚es
DIM bonespear AS equipment
bonespear.equipmentname = "Bone spear"
bonespear.equipmentdamage = 2
bonespear.equipmentdefense = 0
bonespear.equipmentdurability = 20
bonespear.equipmentcount = 0

DIM flintspear AS equipment
flintspear.equipmentname = "Flint spear"
flintspear.equipmentdamage = 4
flintspear.equipmentdefense = 0
flintspear.equipmentdurability = 30
flintspear.equipmentcount = 0

DIM copperspear AS equipment
copperspear.equipmentname = "Copper spear"
copperspear.equipmentdamage = 6
copperspear.equipmentdefense = 0
copperspear.equipmentdurability = 40
copperspear.equipmentcount = 0

DIM ironspear AS equipment
ironspear.equipmentname = "Iron spear"
ironspear.equipmentdamage = 8
ironspear.equipmentdefense = 0
ironspear.equipmentdurability = 50
ironspear.equipmentcount = 0

DIM stoneaxe AS equipment
stoneaxe.equipmentname = "Stone axe"
stoneaxe.equipmentdamage = 1
stoneaxe.equipmentdefense = 1
stoneaxe.equipmentdurability = 20
stoneaxe.equipmentcount = 0

DIM copperaxe AS equipment
copperaxe.equipmentname = "Copper axe"
copperaxe.equipmentdamage = 3
copperaxe.equipmentdefense = 2
copperaxe.equipmentdurability = 35
copperaxe.equipmentcount = 0

DIM ironaxe AS equipment
ironaxe.equipmentname = "Iron axe"
ironaxe.equipmentdamage = 4
ironaxe.equipmentdefense = 4
ironaxe.equipmentdurability = 50
ironaxe.equipmentcount = 0
'Hide
DIM skingloves AS equipment
skingloves.equipmentname = "Hide gloves"
skingloves.equipmentdamage = 0
skingloves.equipmentdefense = 1
skingloves.equipmentdurability = 15
skingloves.equipmentcount = 0

DIM skinshoes AS equipment
skinshoes.equipmentname = "Hide shoes"
skinshoes.equipmentdamage = 0
skinshoes.equipmentdefense = 1
skinshoes.equipmentdurability = 15
skinshoes.equipmentcount = 0

DIM skinhelmet AS equipment
skinhelmet.equipmentname = "Hide helmet"
skinhelmet.equipmentdamage = 0
skinhelmet.equipmentdefense = 1
skinhelmet.equipmentdurability = 15
skinhelmet.equipmentcount = 0

DIM skinarmor AS equipment
skinarmor.equipmentname = "Hide armor"
skinarmor.equipmentdamage = 0
skinarmor.equipmentdefense = 2
skinarmor.equipmentdurability = 30
skinarmor.equipmentcount = 0
'Leather
DIM leathergloves AS equipment
leathergloves.equipmentname = "Leather gloves"
leathergloves.equipmentdamage = 0
leathergloves.equipmentdefense = 2
leathergloves.equipmentdurability = 20
leathergloves.equipmentcount = 0

DIM leathershoes AS equipment
leathershoes.equipmentname = "Leather shoes"
leathershoes.equipmentdamage = 0
leathershoes.equipmentdefense = 2
leathershoes.equipmentdurability = 20
leathershoes.equipmentcount = 0

DIM leatherhelmet AS equipment
leatherhelmet.equipmentname = "Leather helmet"
leatherhelmet.equipmentdamage = 0
leatherhelmet.equipmentdefense = 2
leatherhelmet.equipmentdurability = 20
leatherhelmet.equipmentcount = 0

DIM leatherarmor AS equipment
leatherarmor.equipmentname = "Leather armor"
leatherarmor.equipmentdamage = 0
leatherarmor.equipmentdefense = 3
leatherarmor.equipmentdurability = 35
leatherarmor.equipmentcount = 0

bonespear.equipmentcount = 0: flintspear.equipmentcount = 0: copperspear.equipmentcount = 0: ironspear.equipmentcount = 0:
stoneaxe.equipmentcount = 0: copperaxe.equipmentcount = 0: ironaxe.equipmentcount = 0:
skingloves.equipmentcount = 0: skinshoes.equipmentcount = 0: skinhelmet.equipmentcount = 0: skinarmor.equipmentcount = 0:
leathergloves.equipmentcount = 0: leathershoes.equipmentcount = 0: leatherhelmet.equipmentcount = 0: leatherarmor.equipmentcount = 0:
MAX_VALUE = 100
'statistics
health = 100: food = 0: hunger = 100: water = 0: thirst = 100: energy = 100: warmth = 100: hygiene = 100: '----------------reset
hour = 8: day = 1: minute = 0: newday = 0: oldday = 0
'base resources
rock = 0: wood = 0: leaf = 0: clay = 0: flint = 0: vine = 0: plant = 0: bark = 0:
kokiyas = 0: sand = 0: bone = 0: copperore = 0: ironore = 0: coal = 0:
'medicinal herbs
motherwort = 0: houseleek = 0: stjohnwort = 0: rosehip = 0: borage = 0: eucalyptus = 0: cinquefoil = 0: myrtle = 0: euphrasia = 0: groundivy = 0: marshmallow = 0: sarsaparilla = 0: walnut = 0:
'switches
event1 = 0: event2 = 0: event3 = 0: event4 = 0: event5 = 0: event6 = 0: event7 = 0: event8 = 0: event9 = 0: event10 = 0:
'crafted items/tools
woodshovel = 0: coppershovel = 0: ironshovel = 0:
copperpickaxe = 0: ironpickaxe = 0:
claybowl = 0: glassbottle = 0
copperbar = 0: ironbar = 0: brick = 0: paper = 0: map = 0: boneglue = 0: thread = 0: wax = 0: mortarpestle = 0: flux = 0: rope = 0: leather = 0: drawingmats = 0: bucket = 0: tar = 0:
'animal resources
skin = 0: feather = 0: fat = 0: snakevenom = 0: pearl = 0:
'buildings
shelter = 0: watercollector = 0: bed = 0: firering = 0: clayworkshop = 0: basicforge = 0: paperpress = 0: brickshelter = 0: cauldron = 0: fireplace = 0: tanningtub = 0: tarkiln = 0:
'main menu actions
mainaction(001) = "  Eat                      "
mainaction(002) = "  Drink                    "
mainaction(003) = "  Rest                      "
mainaction(004) = "  Look for food and water  "
mainaction(005) = "  Look for food            "
mainaction(006) = "  Look for water            "
mainaction(007) = "  Fish                      "
mainaction(008) = "  Wash in the ocean        "
mainaction(009) = "  Light a fire              "
mainaction(010) = " Build...                  "
mainaction(011) = " Craft...                  "
mainaction(012) = " Look for rock and wood    "
mainaction(013) = " Gather...                  "
mainaction(014) = " Wait half an hour          " 'Ajouter actions and tout reorganiser
mainaction(015) = " Wait an hour              "
mainaction(016) = " Status and buildings      "
mainaction(017) = " Inventory                  "
mainaction(018) = " Hunt...                    "
mainaction(019) = " Explore...                "
mainaction(020) = " Equipment description      "
mainaction(021) = " Campsite                  "
mainaction(022) = " Map of the island          "
mainaction(023) = " Help                      "
mainaction(024) = " Exit                      "
'Séparer les ramassages par catégories
gather(001) = "  Rock                "
gather(002) = "  Wood                "
gather(003) = "  Leaves              "
gather(004) = "  Clay                "
gather(005) = "  Flint                "
gather(006) = "  Vines                "
gather(007) = "  Medicinal herbs      "
gather(008) = "  Plants              "
gather(009) = "  Bark                "
gather(010) = " Seashells            "
gather(011) = " Sand                  "
gather(012) = " Bones                "
gather(013) = " Copper ore            "
gather(014) = " Iron ore              "
gather(015) = " Coal                  "
gather(016) = "Option 16              "
gather(017) = "Option 17              "
gather(018) = "Option 18              "
gather(019) = "Option 19              "
gather(020) = "Option 20              "
gather(021) = "Option 21              "
gather(022) = "Option 22              "
gather(023) = "Option 23              "
gather(024) = "Option 24              "     
gather(025) = "Option 25              "
gather(026) = "Option 26              "
gather(027) = "Option 27              "
gather(028) = "Option 28              "
gather(029) = "Option 29              "
gather(030) = "Option 30              "
'constructions
build(001) = "  Shelter        (Cost: 15 Rocks - 15 Wood - 10 Leaves)                                      "
build(002) = "  Water collector (Cost: 5 Rocks - 5 Wood - 1 Bark)                                          "
build(003) = "  ???????        (Cost: ??????                                                              " 'bed will be discovered once a shelter is built
build(004) = "  Campfire        (Cost: 10 Rocks)                                                            "
build(005) = "  Paper press    (Cost: 10 Wood - 2 Iron bars - 1 Sand)                                      "
build(006) = "  Clay workshop  (Cost: 10 Wood - 10 Rocks - 10 Clay - 10 Water - 5 Sand)                    "
build(007) = "  Basic forge    (Cost: 15 Bricks - 15 Coal - 5 Wood - 5 Clay - 10 Water - 5 Sand - 5 Rocks) "
build(008) = "  ???????        (Cost: ??????                                                              " 'brick shelter will be discovered once a shelter is built
build(009) = "  Cauldron        (Cost: 12 Clay)                                                            "
build(010) = " Fireplace      (Cost: 15 Rocks - 15 Clay)                                                  "
build(011) = " Tanning tub    (Cost: 10 Wood - 10 Bark - 50 Water)                                        "
build(012) = " Tar kiln        (Cost: 15 Rocks - 15 Clay)                                                  "
build(013) = " Ship            (Cost: 100 Wood - 20 Iron bars - 20 Tar - 20 Water - 20 Leather - 10 Ropes)  "
build(014) = "                                                                                              "
'crafts
craft(001) = "  Bone spear      "
craft(002) = "  Flint spear    "
craft(003) = "  Copper spear    "
craft(004) = "  Iron spear      "
craft(005) = "  Stone axe      "
craft(006) = "  Copper axe      "
craft(007) = "  Iron axe        "
craft(008) = "  Wooden shovel  "
craft(009) = "  Copper shovel  "
craft(010) = " Iron shovel      "
craft(011) = " Clay pot        "
craft(012) = " Copper pickaxe  "
craft(013) = " Iron pickaxe    "
craft(014) = " Glass bottle    "
craft(015) = " Copper bar      "
craft(016) = " Iron bar        "
craft(017) = " Brick            "
craft(018) = " Flux            "
craft(019) = " Rope            "
craft(020) = " Bone glue        "
craft(021) = " Thread          "
craft(022) = " Armors          "
craft(023) = " Mortier-pilon    "
craft(024) = " Leather          "
craft(025) = " Bucket          "
craft(026) = " Tar              "
craft(027) = " Herbal remedies  "
craft(028) = " Paper            "
craft(029) = " Drawing materials"
craft(030) = " Map of the island"
craft(031) = "1                    "
craft(032) = "1                    "
craft(033) = "1                    "
craft(034) = "1                    "
craft(035) = "1                    "
craft(036) = "1                    "
craft(037) = "1                    "
craft(038) = "1                    "
craft(039) = "1                    "
craft(040) = "1                    "
craft(041) = "1                    "
craft(042) = "1                    "
craft(043) = "1                    "
craft(044) = "1                    "
craft(045) = "1                    "
craft(046) = "1                    "
craft(047) = "1                    "
craft(048) = "1                    "
'lieux
mainlocation(001) = " Meadow    "
mainlocation(002) = " Hills    "
mainlocation(003) = " Jungle    "
mainlocation(004) = " Mountain  "
mainlocation(005) = " Beach    "
mainlocation(006) = " Desert    "
mainlocation(007) = " Volcano  "
mainlocation(008) = " Cave      "
mainlocation(009) = " Cliffs    "
'sous-lieux
meadows(001) =          " Savanna              "
meadows(002) =          " Desert prairie      "
meadows(003) =          " Flower meadow        "
meadows(004) =          " Wetlands            "
hills(001) =            " Fertile valley      "
hills(002) =            " Meandering river    "
hills(003) =            " Wavy hills          "
hills(004) =            " Rocky hills          "
hills(005) =            " Deep hole            "
jungles(001) =          " Humid tropical forest"
jungles(002) =          " Jungle waterfall    "
jungles(003) =          " Mangrove            "
jungles(004) =          " Bamboo jungle        "
jungles(005) =          " Palm grove          "
jungles(006) =          " Fresh water marsh    "
jungles(007) =          " Salt water marsh    "
mountains(001) =        " Tropical mountain    "
mountains(002) =        " Rocku highlands      " 
mountains(003) =        " Cloud forest        "
mountains(004) =        " Hotsprings          "
mountains(005) =        " Moutain waterfall    "
mountains(006) =        " Mountain lake        "
beaches(001) =          " White sand beach    "
beaches(002) =          " Coral reef          "
beaches(003) =          " Turquoise lagoon    "
beaches(004) =          " Underwater cavern    "
beaches(005) =          " Small island        "
beaches(006) =          " Pebble beach        "
beaches(007) =          " Old shipwreck        "
deserts(001) =          " Coastal desert      "
deserts(002) =          " Da desert          "
deserts(003) =          " Rocky desert        "
deserts(004) =          " Salt desert          "
deserts(005) =          " Arid desert          "
deserts(006) =          " Oasis                "
volcanoes(001) =        " Active volcano      "
volcanoes(002) =        " Extinct volcano      "
volcanoes(003) =        " Volcano crater      "
volcanoes(004) =        " Lava field          "
caves(001) =            " Limestone cave      "
caves(002) =            " Lava cave            "
caves(003) =            " Sea cave            "
caves(004) =            " Underground river    "
cliffs(001) =          " Steep cliffs        "
cliffs(002) =          " Sea cliffs          "
cliffs(003) =          " River cliffs        "
cliffs(004) =          " Sandstone cliffs    "
'herbes medicinales
herbs(001) = "  Motherwort    "
herbs(002) = "  Houseleek      "
herbs(003) = "  St. John's wort"
herbs(004) = "  Rosehip        "
herbs(005) = "  Borage        "
herbs(006) = "  Eucalyptus    "
herbs(007) = "  Cinquefoil    "
herbs(008) = "  Myrtle        "
herbs(009) = "  Euphrasia      "
herbs(010) = " Ground ivy      "
herbs(011) = " Marshmallow    "
herbs(012) = " Sarsaparilla    "
herbs(013) = " Walnut          "

'medicine
medicine(001) = "  Marshmallow cataplasm      (Treats abscesses)    "
medicine(002) = "  Walnut decoction          (Treats sore throat)  "
medicine(003) = "  Sarsaparilla decoction    (Treats asthma)      "
medicine(004) = "  Mytle mixture              (Treats bronchitis)  "
medicine(005) = "  Motherwort infusion        (Treats diarrhea)    "
medicine(006) = "  Borage infusion            (Treats fever)        "
medicine(007) = "  Eucalyptus infusion        (Treats flu)          "
medicine(008) = "  Houseleek infusion        (Treats infections)  "
medicine(009) = "  Ground ivy mixture        (Treats colds)        "
medicine(010) = " Rosehip balm              (Treats conjunctivitis)"
medicine(011) = " Rosehip infusion          (Heals 10 health)      "
medicine(012) = " Rosehip balm              (Heals 30 health)      "
medicine(013) = " Antidote                  (Cure poison)          "
medicine(014) = ""
medicine(015) = ""
medicine(016) = ""
'armors
armors(001) = " Hide shoes    "
armors(002) = " Hide helmet  "
armors(003) = " Hide armor    "
armors(004) = " Hide gloves  "
armors(005) = " Leather shoes "
armors(006) = " Leather helmet"
armors(007) = " Leather armor "
armors(008) = " Leather gloves"
armors(009) = "                    "
armors(010) = "                    "
armors(011) = "                    "
armors(012) = "                    "
armors(013) = "                    "
armors(014) = "                    "
armors(015) = "                    "
armors(016) = "                    "
armors(017) = "                    "
armors(018) = "                    "


'animaux a chasser nivWater de difficulte : tres facile, facile, moyen, difficile, tres difficile, dangereux, tres dangereux

enemy(001) = " Rabbit          (Very easy) (Def : 0)"
enemy(002) = " Crab            (Easy)      (Def : 1)"
enemy(003) = " Wild chicken    (Easy)      (Def : 1)"
enemy(004) = " Fox            (Medium)    (Def : 4)"
enemy(005) = " Vulture        (Easy)      (Def : 2)"
enemy(006) = " Snake          (Difficult) (Def : 3)"
enemy(007) = " Lizard          (Medium)    (Def : 1)"
enemy(008) = " Squirrel        (Very easy) (Def : 0)"
enemy(009) = "                                        "
enemy(010) = "                                        "
enemy(011) = "                                        "
enemy(012) = "                                        "
enemy(013) = "                                        "
enemy(014) = "                                        "
enemy(015) = "                                        "
enemy(016) = "                                        "
enemy(017) = "                                        "
enemy(018) = "                                        "
enemy(019) = "                                        "
enemy(020) = "                                        "


CLS

WHILE choice <> 24 'beginning of the loop


  SELECT CASE choice
CASE 1 'Eat food
            IF food >= 10 THEN
eat& = _SNDOPEN("eat.mp3")
_SNDPLAY eat& 
  food = food - 10
hygiene = hygiene - 1
                minutes = minutes + 10
                health = health + 3
                hunger = hunger + 25
warmth = warmth - 1
if food <= 0 then
food =0
end if
                PRINT "You have eaten. Remaining food : "; food
Sleep
            ELSE
                PRINT "You do not have enough food. (Minimum 10 units required)"
Sleep
            END IF
           
           
        CASE 2 'boire de l'Water


            IF water >= 10 THEN
drink& = _SNDOPEN("drink.mp3")
_SNDPLAY drink&
                water = water - 10
                minutes = minutes + 1
                energy = energy - 1
                health = health + 3
                thirst = thirst + 25
                PRINT "You have drank. Remaining water : "; water
Sleep
            ELSE
                PRINT "You do not have enough water (Minimum 10 units required)"
Sleep
            END IF           
           
        CASE 3 'se reposer

IF (energy < 100 AND brickshelter = 1) THEN
energy = energy + 45
If energy >= 100 THEN
energy = 100
End if
                hunger = hunger - 2
                thirst = thirst - 2
                hour = hour + 4
minutes = minutes + 15
warmth = warmth + 1
hygiene = hygiene - 2

PRINT "You have rested in the brick shelter"
IF bed = 1 THEN
energy = energy + 5
hour = hour + 1
hygiene = hygiene - 1
health = health + 2
print "You have slept in a bed"
If energy >= 100 THEN
                energy = 100
end if
end if
print "Current energy : "; energy
sleep
           

elseIF (energy < 100 AND shelter = 1) THEN
energy = energy + 35
If energy >= 100 THEN
energy = 100
End if
                hunger = hunger - 2
                thirst = thirst - 2
                hour = hour + 3
minutes = minutes + 30
warmth = warmth + 1
hygiene = hygiene - 2

PRINT "You have rested in the shelter"
IF bed = 1 THEN
energy = energy + 5
hour = hour + 1
hygiene = hygiene - 1
health = health + 2
print "You have slept in a bed"
If energy >= 100 THEN
                energy = 100
end if
end if

print "Current energy : "; energy
Sleep

ELSEif (energy < 100 AND shelter = 0) THEN



energy = energy + 23

hunger = hunger - 3
                thirst = thirst - 3
                hour = hour + 2
warmth = warmth - 1
hygiene = hygiene - 3

If energy >= 100 THEN
                energy = 100
end if
PRINT "You have rested a bit. Current energy : "; energy
Sleep

                ELSE
                PRINT "You are already well-rested"
Sleep
                END IF
        CASE 4 ' chercher Water and nourriture

            IF (food < 100) AND (water < 100) then
            energy = energy - 13
            hour = hour + 2
minutes = minutes + 30
            food = food + 9
            water = water + 9
            hunger = hunger - 7
            thirst = thirst - 6
warmth = warmth - 3*rnd
health = health - 2*rnd
hygiene = hygiene - 2
           
            If food >= 100 THEN
            food = 100
            End if
           
            If water >= 100 THEN
            water = 100
            End if
            PRINT "You have found 9 units of food and 9 units of water."
            print "Food and Water left : " ; food "and" water
Sleep
           
            ELSE
           
            print "You have enough food and water"
Sleep
           
            End if
        CASE 5 ' chercher nourriture

            IF food < 100 THEN
               
                food = food + 5+10*rnd
                energy = energy - 7
                hour = hour + 1
                hunger = hunger - 4
                thirst = thirst - 5
warmth = warmth - 2
health = health - 1*rnd
hygiene = hygiene - 1
                If food >= 100 THEN
                food = 100
                End if
                textfood = RND
select case textfood
case 0 to 0.10
                PRINT "You picked up some pineapples. Food left : "; food
case 0.11 to 0.20
PRINT "You picked up some coconuts. Food left : "; food
case 0.21 to 0.30
PRINT "You picked up some mangoes. Food left : "; food
case 0.31 to 0.40
PRINT "You picked up some papayas. Food left : "; food
case 0.41 to 0.50
PRINT "You picked up some guavas. Food left : "; food
case 0.51 to 0.60
PRINT "You picked up some passion fruit. Food left : "; food
case 0.61 to 0.70
PRINT "You picked up some lychees. Food left : "; food
case 0.71 to 0.999
PRINT "You picked up some bananas. Food left : "; food
end select
Sleep
            ELSE
                PRINT "You already have enough food."
Sleep
            END IF
           
        CASE 6 'search Water
IF (water < 100 AND claybowl >= 1) Then
water = water + 35
                energy = energy - 8
                hour = hour + 1
hunger = hunger - 3
                thirst = thirst - 1
warmth = warmth - 2
health = health - 1*rnd
hygiene = hygiene - 1
               
                If water >= 100 THEN
                water = 100

sleep
                End if
PRINT "You have filled a pot full of water. Water left : "; water
sleep


            ELSEIF  (water < 100 AND claybowl < 1) Then
             
water = water + 10
                energy = energy - 6
                hour = hour + 1
hunger = hunger - 3
                thirst = thirst - 1
warmth = warmth - 2
health = health - 1*rnd
hygiene = hygiene - 1
If water >= 100 THEN
water = 100

sleep
End if

PRINT "You have found some water. Water left : "; water
sleep

else
print "You already have enough water"
Sleep
            END IF

           
           
CASE 7 'fish

IF (food < 100) then

If (bonespear.equipmentcount >= 1 OR flintspear.equipmentcount >= 1 Or copperspear.equipmentcount >= 1 OR ironspear.equipmentcount >= 1)  then
'son spearfishing
energy = energy - 10
hour = hour + 1

spearfishing = rnd
select case spearfishing

Case 0 To 0.20
food = food + 10
If food >= 100 THEN
food = 100
End if
Print "You fish with a spear..."
_delay 0.4
print "After one hour, you found a small-sized fish."
print "Food left : " food
Case 0.21 To 0.40
food = food + 15
If food >= 100 THEN
food = 100
End if
Print "You pˆchez … la lance..."
_delay 0.4
print "After one hour, you found a medium-sized fish."
print "Food left : " food
Case 0.41 To 0.60
food = food + 30
If food >= 100 THEN
food = 100
End if
Print "You pˆchez … la lance..."
_delay 0.4
print "After one hour, you found a big-sized fish."
print "Food left : " food
Case IS > 0.61
_delay 0.4
print "Au bout d'a heure, vous ne trouvez rien..."
END SELECT
 
 
elseif (food < 100) then
print "You do not have anything to catch fish"
else
print "You have enough food."
end if
end if
sleep

Case 8 'wash in the ocean

IF hygiene < 100 THEN
                hygiene = hygiene + 20
                energy = energy - 6
                minutes = minutes + 10
hunger = hunger - 3
                thirst = thirst - 3
warmth = warmth - 5
health = health - 1*rnd
               
                If hygiene >= 100 THEN
                hygiene = 100
                End if
                PRINT "You have washed yourself in the ocean. Hygiene : "; hygiene
Sleep
            ELSE
                PRINT "You are already very clean."
Sleep
            END IF


       
       
CASE 9 'fire, needs 1 wood


IF wood >= 1 THEN
wood = wood - 1
hour = hour + 1
if firering = 1 then 'if campfire is built
fire& = _SNDOPEN("fire.mp3")
_SNDPLAY fire&
minutes = minutes + 45
energy = energy - 4
hunger = hunger - 2
thirst = thirst - 5*rnd
warmth = warmth + 47*rnd+2
hygiene = hygiene - 1
If warmth >= 100 THEN
warmth = 100
End if
PRINT "You have made a fire in the campfire. You feel warmer."
print "Wood left : " wood
print "Warmth : " warmth
_delay 0.5
Else
fire& = _SNDOPEN("fire.mp3")
_SNDPLAY fire&
minutes = minutes + 30
energy = energy - 5
hunger = hunger - 3
thirst = thirst - 7*rnd
warmth = warmth + 36*rnd+2
hygiene = hygiene - 1
If warmth >= 100 THEN
warmth = 100
end if
PRINT "You lit a fire. You feel a bit warmer."
print "Wood left : " wood
print "Warmth : " warmth
_delay 0.5
end if
sleep
                ELSE
                PRINT "You need some wood to light a fire. Wood : " wood
sleep
            END IF
     
CASE 10 'menu de construction ''''''''''''''''''''''''''''''''''''''''''''''''''
CLS
FOR s = 1 TO 14 STEP 2 'a augmenter------------------------------
print ""
PRINT s; build(s),, s + 1; build(s + 1),,
NEXT s
print ""
print ""
Input " What would you like to build? : ";choixbuild
print ""

SELECT CASE choixbuild

Case 1  'choix construction abri

If (brickshelter = 1) Then
print "You already have a better shelter than this one"
sleep

ElseIf (shelter = 1) then
            Print "You already have built a shelter"
Sleep

            Elseif (rock >= 15) AND (wood >= 15) AND (leaf >= 10) then
build& = _SNDOPEN("build.mp3")
_SNDPLAY build&
shelter = 1
rock = rock - 15
wood = wood - 15
leaf = leaf - 10
hour = hour + 4
energy = energy - 30
warmth = warmth - 4
health = health - 1*rnd
hunger = hunger - 10
thirst = thirst - 10
hygiene = hygiene -  3
PRINT "You have build a shelter. You now feel more secure."
sleep
ELSE
Print "Resources needed to build a shelter : "
print "15 Rocks, 15 Wood and 10 Leaves"
sleep
End if


Case 2 'choix construction r‚cuperateur d'Water

If (watercollector = 1) then
            Print "You already have built a water collector"
Sleep

            Else
IF (rock >= 5) AND (wood >= 5) AND (bark >= 1) then
build& = _SNDOPEN("build.mp3")
_SNDPLAY build&
watercollector = 1
rock = rock - 5
wood = wood - 5
bark = bark - 1
hour = hour + 4
energy = energy - 30
warmth = warmth - 4
health = health - 1*rnd
hunger = hunger - 10
thirst = thirst - 10
hygiene = hygiene - 2
PRINT "You have built a water collector."
sleep
ELSE
Print "You need 5 Rocks, 5 Wood and 1 Bark to build a water collector"
sleep
End if
end if

Case 3 'choix construction lit


If (bed = 1) then
            Print "You already have built a bed"
Sleep

            Else
IF (wood >= 10) AND (leaf >= 10) AND (vine >= 8) AND (shelter = 1 OR brickshelter =1) then 'abri en Brick aussi?
build& = _SNDOPEN("build.mp3")
_SNDPLAY build&
bed = 1
wood = wood - 10
leaf = leaf - 10
vine = vine - 8
hour = hour + 4
energy = energy - 27
warmth = warmth - 4
health = health - 1*rnd
hunger = hunger - 9
thirst = thirst - 9
hygiene = hygiene - 2
PRINT "You already have built a bed"
sleep
ELSE
print "You will need a shelter first, as well as 10 Wood, 10 Leaves and 8 Vines to build this"
sleep
End if
end if


Case 4 'cercle de Rock

If (firering = 1) then
            Print "You already have a campfire"
Sleep

            Else
IF (rock >= 10) then
build& = _SNDOPEN("build.mp3")
_SNDPLAY build&
firering = 1
rock = rock - 10
minutes = minutes + 30
energy = energy - 5
warmth = warmth - 1
health = health - 1*rnd
hunger = hunger - 4
thirst = thirst - 4
hygiene = hygiene - 1
PRINT "You have build a campfire"
sleep
ELSE
print "You will need 10 rocks to build a campfire"
sleep
End if
end if

Case 5 'presse … papier

If (paperpress = 1) then
            Print "You already have a paper press"
Sleep

            Else
IF (wood >= 10) AND (ironbar >= 2) AND (sand >= 1) then
build& = _SNDOPEN("build.mp3")
_SNDPLAY build&
paperpress = 1
wood = wood - 10
ironbar = ironbar - 2
sand = sand - 1
hour = hour + 3
minutes = minutes + 30
energy = energy - 25
warmth = warmth - 3
health = health - 2*rnd
hunger = hunger - 9
thirst = thirst - 9
hygiene = hygiene - 2
PRINT "You have built a paper press"
sleep
ELSE
print "You need 10 Wood, 2 Iron bars and 1 Sand to build a paper press"
sleep
End if
end if


Case 6 'atelier de poterie

If (clayworkshop = 1) then
            Print "You already have a clay workshop"
Sleep

            Else
IF (wood >= 10) AND (rock >= 10) AND (clay >= 10) AND (sand >= 5) And (water >= 10) then 
build& = _SNDOPEN("build.mp3")
_SNDPLAY build&
clayworkshop = 1
wood = wood - 10
rock = rock - 10
clay = clay - 10
water = water - 10
sand = sand - 5
hour = hour + 3
energy = energy - 28
warmth = warmth - 3
health = health - 2*rnd
hunger = hunger - 9
thirst = thirst - 10
hygiene = hygiene - 3
PRINT "You have built a clay workshop"
sleep
ELSE
print "You need 10 Wood, 10 Rock, 10 Clay, 10 Water and 5 Sand to build a clay workshop"
sleep
End if
end if


Case 7 'forge basique

If (basicforge = 1) then
            Print "You already have a basic forge"
Sleep

            Else
IF (brick >= 15) AND (coal >= 15) AND (wood >= 5) AND (clay >= 5) AND (sand >= 5) And (rock >= 5) AND (water >= 10) then 
build& = _SNDOPEN("build.mp3")
_SNDPLAY build&
basicforge = 1
brick = brick - 15
coal = coal - 15
wood = wood - 5
clay = clay - 5
sand = sand - 5
rock = rock - 5
water = water - 10
hour = hour + 6
energy = energy - 34
warmth = warmth - 3
health = health - 2*rnd
hunger = hunger - 15
thirst = thirst - 15
hygiene = hygiene - 5
PRINT "You have built a basic forge"
sleep
ELSE
print "You need 15 Bricks, 15 Coal, 5 Wood, 5 Clay, 10 Water, 5 Sand and 5 Rock to build a basic forge"
sleep
End if
end if


Case 8 'abri en Brick
If (shelter = 0) then
print "You haven't unlocked this building yet"
sleep

ELSEIF (brickshelter = 1) then
            Print "You already have built a brick shelter"
Sleep

            ElseiF (shelter = 1) AND (brick >= 30) AND (wood >= 15) AND (leaf >= 15) then
build& = _SNDOPEN("build.mp3")
_SNDPLAY build&

shelter = shelter - 1
brickshelter = 1
rock = rock - 15
wood = wood - 15
leaf = leaf - 15
hour = hour + 4
energy = energy - 30
warmth = warmth - 4
health = health - 1*rnd
hunger = hunger - 10
thirst = thirst - 10
hygiene = hygiene -  3
PRINT "You have built a brick shelter. You feel now very secure"
sleep
ELSE
Print "In order to build a brick shelter, you will first need a shelter, as well as 30 Bricks, 15 Wood and 15 Leaves"
sleep
End if



Case 9 'chaudron


If (cauldron = 1) then
            Print "You already have a cauldron"
Sleep

elseIf (clay >= 12) AND (clayworkshop = 1) then
build& = _SNDOPEN("build.mp3")
_SNDPLAY build&
cauldron = cauldron + 1
clay = clay - 12
hour = hour + 2
energy = energy - 20
warmth = warmth - 4
health = health - 1*rnd
hunger = hunger - 10
thirst = thirst - 10
hygiene = hygiene -  7
PRINT "You have build a clay cauldron."
sleep
ELSE
Print "You need a clay workshop and 12 Clay in order to build a cauldron"
sleep
end if

Case 10 'cheminee

If (fireplace = 1) then
            Print "You already have built a fireplace"
Sleep

elseIf (clay >= 15) AND (rock >= 15) then
build& = _SNDOPEN("build.mp3")
_SNDPLAY build&
fireplace = fireplace + 1
clay = clay - 15
rock = rock - 15
hour = hour + 2
energy = energy - 20
warmth = warmth - 4
health = health - 1*rnd
hunger = hunger - 10
thirst = thirst - 10
hygiene = hygiene -  7
PRINT "You have built a fireplace."
sleep
ELSE
Print "You need 12 Rocks and 12 Clay in order to build a fireplace"
sleep
end if

case 11 'bac de tannage
if (tanningtub = 1) THEN
print "You already have a tanning tub"
sleep
Elseif (wood >= 10) AND (bark >= 10) and (water >= 50) then
tanningtub = tanningtub + 1
wood = wood - 10
bark = bark - 10
water = water -10
hour = hour - 1
minutes = minutes + 30
energy = energy - 18
warmth = warmth - 2
hygiene = hygiene -  7
PRINT "You have built a tanning tub."
sleep
ELSE
Print "You need 10 Wood, 10 Barks and 50 Water to build a tanning tub."
sleep
end if

case 12 'tar kiln / four a Tar
if (tarkiln = 1) THEN
print "You already have a tar kiln"
sleep
Elseif (rock >= 15) AND (clay >= 15) then
tarkiln = tarkiln + 1
rock = rock - 15
clay = clay - 15
hour = hour - 4
minutes = minutes + 30
energy = energy - 21
warmth = warmth - 2
hygiene = hygiene -  7
PRINT "You have built a tar kiln."
sleep
ELSE
Print "You need 10 Rock and 10 Clay to build a tar kiln"
sleep
end if
case 13 'navire
If (wood >= 100) AND (ironbar >= 20) AND (tar >= 20) AND (skin >= 20) and (leather >= 20) AND (rope >= 10) THEN
PRINT "You have built a ship !"
wood = wood - 100
ironbar = ironbar - 20
Tar = Tar - 20
skin = skin - 20
leather = leather - 20
rope = rope - 10
sleep
cls
                            boat& = _SNDOPEN("boat.mp3")
                            _SNDPLAY boat&
                            locate 32,95
                            print "You board your ship in order to leave the island"
                            _delay 1
                            locate 32,95
                            print "You board your ship in order to leave the island."
                            _Delay 1
                            locate 32,95
                            print "You board your ship in order to leave the island.."
                            _Delay 1
                            locate 32,95
                            print "You board your ship in order to leave the island..."
                            _Delay 1
                            'debut some fondu
                            Color LightGray
                            locate 32,95
                            print "You board your ship in order to leave the island..."
                            _Delay .4
                            Color DarkGray
                            locate 32,95
                            print "You board your ship in order to leave the island..."
                            _Delay .4
                            Color DimGray
                            locate 32,95
                            print "You board your ship in order to leave the island..."
                            _Delay .4
                            Color Black
                            locate 32,95
                            print "You board your ship in order to leave the island..."
                            _Delay .5
                            _delay 1.2
                            sleep
                            sleep
                            Color White 'retour au blanc
sleep
ELSE
Print "You need 100 Wood, 20 Iron bars, 20 Tar, 20 Hides, 20 Leather and 10 Ropes to build a ship"
sleep
end if

case 14

End Select


Case 11 'menu de craft crafts '''''''''''''''''''''''''''''''''''''''''''''''''''''''

CLS
FOR s = 1 TO 30 STEP 3 'a etendre
PRINT s; craft(s),, s + 1; craft(s + 1),, s + 2; craft(s + 2)
NEXT s
print ""
Input " What would you like to craft ? : ";choixcraft
print ""

SELECT CASE choixcraft

Case 1 'Bone spear

IF (wood >= 5) AND (bone >= 3) AND (thread >= 1) then
bonespear.equipmentcount = bonespear.equipmentcount + 1
wood = wood - 5
bone = bone - 3
thread = thread - 1
hour = hour + 2
minutes = minutes + 30
energy = energy - 15
warmth = warmth - 3
health = health - 2*rnd
hunger = hunger - 4
thirst = thirst - 4
hygiene = hygiene - 1
PRINT "You have made a Bone spear"
ELSE
Print "You need 5 Wood, 3 bones and 1 Thread to make a Bone spear"
End if

Case 2 'Flint spear

IF (wood >= 5) AND (flint >= 5) AND (thread >= 1) AND (boneglue >= 1) then
flintspear.equipmentcount = flintspear.equipmentcount + 1
wood = wood - 5
boneglue = boneglue - 1
flint = flint - 5
vine = vine - 2
hour = hour + 3
energy = energy - 15
warmth = warmth - 3
health = health - 2*rnd
hunger = hunger - 4
thirst = thirst - 4
hygiene = hygiene - 1
PRINT "You have made a Flint spear"
ELSE
Print "You need 5 Wood, 5 Flint, 1 Thread and 1 Bone glue to make a Flint spear"
End if

Case 3 'Copper spear

IF (wood >= 5) AND (copperbar >= 2) AND (thread >= 2) AND (basicforge >= 1) AND (leather >= 1) AND (boneglue >= 1) then
anvil& = _SNDOPEN("anvil.mp3")
_SNDPLAY anvil&
copperspear.equipmentcount = copperspear.equipmentcount + 1
wood = wood - 5
copperbar = copperbar - 2
thread = thread - 2
hour = hour + 1
boneglue = boneglue - 1
leather = leather - 1
minutes = minutes + 30
energy = energy - 19
warmth = warmth - 3
health = health - 2*rnd
hunger = hunger - 4
thirst = thirst - 4
hygiene = hygiene - 3
PRINT "You have made a Copper spear"
ELSE
Print "You need 5 Wood, 2 Copper bars, 2 Threads, 1 Leather, 1 Bone glue and a basic forge to make a Copper spear"
End if

Case 4 'Iron spear

IF (wood >= 5) AND (ironbar >= 2) AND (thread >= 2) AND (basicforge >= 1) AND (leather >= 1) AND (boneglue >= 1) then
anvil& = _SNDOPEN("anvil.mp3")
_SNDPLAY anvil&
ironspear.equipmentcount = ironspear.equipmentcount + 1
wood = wood - 5
ironbar = ironbar - 2
leather = leather - 1
boneglue = boneglue - 1
thread = thread - 2
hour = hour + 1
minutes = minutes + 45
energy = energy - 20
warmth = warmth - 3
health = health - 2*rnd
hunger = hunger - 4
thirst = thirst - 4
hygiene = hygiene - 5
PRINT "You have made a Iron spear"
ELSE
Print "You need 5 Wood, 2 iron bars, 2 Threads, 1 Bone glue and a basic forge to make a Iron spear"
End if


Case 5 'Stone axe

IF (wood >= 3) AND (rock >= 3) AND (vine  >= 1) then
stoneaxe.equipmentcount = stoneaxe.equipmentcount + 1
wood = wood - 3
rock = rock - 3
vine = vine - 1
hour = hour + 1
energy = energy - 15
warmth = warmth - 3
health = health - 2*rnd
hunger = hunger - 4
thirst = thirst - 4
hygiene = hygiene - 1
PRINT "You have made a Stone axe"
ELSE
Print "You need 3 Wood, 3 Rocks and 1 Vine to make a Stone axe"
End if

Case 6 'Copper axe

IF (wood >= 5) AND (copperbar >= 1) AND (vine >= 2) AND (basicforge >= 1) then
anvil& = _SNDOPEN("anvil.mp3")
_SNDPLAY anvil&
copperaxe.equipmentcount = copper.equipmentcount + 1
wood = wood - 5
copperbar = copperbar - 1
vine = vine - 2
hour = hour + 2
energy = energy - 18
warmth = warmth - 3
health = health - 2*rnd
hunger = hunger - 4
thirst = thirst - 4
hygiene = hygiene - 3
PRINT "You have made a Copper axe"
ELSE
Print "You need 5 Wood, 1 Copper bar, 2 Vines and a basic forge to make a Copper axe"
end if

Case 7 'Iron axe

IF (wood >= 5) AND (ironbar >= 1) AND (vine >= 2) AND (basicforge >= 1) then
anvil& = _SNDOPEN("anvil.mp3")
_SNDPLAY anvil&
ironaxe.equipmentcount = ironaxe.equipmentcount + 1
wood = wood - 5
ironbar = ironbar - 1
vine = vine - 2
hour = hour + 2
minutes = minutes + 45
energy = energy - 18
warmth = warmth - 3
health = health - 2*rnd
hunger = hunger - 4
thirst = thirst - 4
hygiene = hygiene - 5
PRINT "You have made a Iron axe"
ELSE
Print "You need 5 Wood, 1 Iron bar, 2 Vines and a basic forge to make a Iron axe"
end if

Case 8 'Wooden shovel

IF (wood >= 7) AND (flint >= 1) then
woodshovel = woodshovel + 1
wood = wood - 7
flint = flint - 1
hour = hour + 2
energy = energy - 18
warmth = warmth - 3
health = health - 2*rnd
hunger = hunger - 4
thirst = thirst - 4
hygiene = hygiene - 1
PRINT "You have made a Wooden shovel"
ELSE
Print "You need 7 Wood and 1 Flint to make a Wooden shovel"
End if


Case 9 'Copper shovel

IF (wood >= 7) AND (copperbar >= 1) AND (basicforge = 1) then
anvil& = _SNDOPEN("anvil.mp3")
_SNDPLAY anvil&
coppershovel = coppershovel + 1
wood = wood - 7
copperbar = copperbar - 1
hour = hour + 3
energy = energy - 19
warmth = warmth - 1
health = health - 2*rnd
hunger = hunger - 4
thirst = thirst - 4
hygiene = hygiene - 2
PRINT "You have made a Copper shovel"
ELSE
Print "You need 7 Wood and 1 Copper bar to make a Copper shovel"
End if

Case 10 'Iron shovel

IF (wood >= 7) AND (ironbar >= 1) AND (basicforge = 1) then
anvil& = _SNDOPEN("anvil.mp3")
_SNDPLAY anvil&
ironshovel = ironshovel + 1
wood = wood - 7
ironbar = ironbar - 1
hour = hour + 3
energy = energy - 19
health = health - 2*rnd
hunger = hunger - 4
thirst = thirst - 4
hygiene = hygiene - 2
PRINT "You have made a Iron shovel"
ELSE
Print "You need 7 Wood and 1 Iron bar to make a Iron shovel"
End if



Case 11 'Clay pot

IF (clay >= 3) AND (wood >= 1) AND (water >= 4) AND (clayworkshop =1) then
claybowl = claybowl + 1
clay = clay - 3
wood = wood - 1
water = water - 4
hour = hour + 2
energy = energy - 11
warmth = warmth - 2
health = health - 1*rnd
hunger = hunger - 4
thirst = thirst - 4
hygiene = hygiene - 1
PRINT "You have made a Clay pot"
ELSE
Print "You need 3 Clay, 1 Wood and 4 Water as well as a clay workshop to make a Clay pot"
End if

Case 12 'Copper pickaxe

IF (wood >= 3) AND (copperbar >= 2) AND (vine >= 2) AND (basicforge >= 1) then
anvil& = _SNDOPEN("anvil.mp3")
_SNDPLAY anvil&
copperpickaxe = copperpickaxe + 1
wood = wood - 5
copperbar = copperbar - 2
vine = vine - 2
hour = hour + 2
minutes = minutes + 45
energy = energy - 18
warmth = warmth - 3
health = health - 2*rnd
hunger = hunger - 4
thirst = thirst - 4
hygiene = hygiene - 5
PRINT "You have made a Copper pickaxe"
ELSE
Print "You need 3 Wood, 2 Copper bars, 2 Vines and a basic forge to make a Copper pickaxe"
end if

Case 13 'Iron pickaxe

IF (wood >= 3) AND (ironbar >= 2) AND (vine >= 2) AND (basicforge >= 1) then
anvil& = _SNDOPEN("anvil.mp3")
_SNDPLAY anvil&
ironpickaxe = ironpickaxe + 1
wood = wood - 5
ironbar = ironbar - 2
vine = vine - 2
hour = hour + 2
minutes = minutes + 45
energy = energy - 18
warmth = warmth - 3
health = health - 2*rnd
hunger = hunger - 4
thirst = thirst - 4
hygiene = hygiene - 5
PRINT "You have made a Iron pickaxe"
ELSE
Print "You need 3 Wood, 2 Iron bars, 2 Vines and a basic forge to make a Iron pickaxe"
end if

Case 14 'Glass bottle
IF (sand >= 4) AND (coal >= 1) AND (basicforge =1) AND (flux >= 1) then
bubbling& = _SNDOPEN("bubbling.mp3")
_SNDPLAY bubbling&
glasbottle = glasbottle + 1
sand = sand - 4
coal = coal - 1
flux = flux - 1
minutes = minutes + 45
energy = energy - 10
health = health - 2*rnd
hunger = hunger - 4
thirst = thirst - 5
hygiene = hygiene - 2
PRINT "You have made a Glass bottle"
ELSE
Print "You need 4 Sand, 1 Coal, 1 Flux as well as a basic forge to make a Glass bottle"
End if
Case 15 'Copper bar
IF (copperore >= 3) AND (coal >= 1) AND (basicforge =1) AND (flux >= 1) then
bubbling& = _SNDOPEN("bubbling.mp3")
_SNDPLAY bubbling&
copperbar = copperbar + 1
copperore = copperore - 3
flux = flux - 1
coal = coal - 1
minutes = minutes + 45
energy = energy - 10

health = health - 2*rnd
hunger = hunger - 4
thirst = thirst - 5
hygiene = hygiene - 2
PRINT "You have made a Copper bar"
ELSE
Print "You need 3 Copper ore, 1 Coal, 1 Flux as well as a basic forge to make a Copper bar"
End if

Case 16 'Iron bar
IF (ironore >= 3) AND (coal >= 2) AND (basicforge =1) then
bubbling& = _SNDOPEN("bubbling.mp3")
_SNDPLAY bubbling&
ironbar = ironbar + 1
ironore = ironore - 3
coal = coal - 2
hour = hour + 1
energy = energy - 10

health = health - 2*rnd
hunger = hunger - 4
thirst = thirst - 6
hygiene = hygiene - 3
PRINT "You have made a Iron bar"
ELSE
Print "You need 3 Iron ore, 2 Coal as well as a basic forge to make an Iron bar"
End if
Case 17 'Brick
IF (clay >= 2) AND (wood >= 1) AND (water >= 3) AND (clayworkshop =1) then
brick = brick + 1
clay = clay - 2
wood = wood - 1
water = water - 3
hour = hour + 2
energy = energy - 5
warmth = warmth - 2
health = health - 1*rnd
hunger = hunger - 2
thirst = thirst - 2
hygiene = hygiene - 2
PRINT "You have made a Brick"
ELSE
Print "You need 2 Clay, 1 Wood and 3 Water as well as a clay workshop to make a Brick"
End if

Case 18 'Flux
IF (kokiyas >= 6) AND (mortarpestle >= 1) then
kokiyas = kokiyas - 6
minutes = minutes + 7
flux = flux + 1
energy = energy - 3
warmth = warmth - 1
hunger = hunger - 2
thirst = thirst - 2
hygiene = hygiene - 2

PRINT "You have made some Flux"
chancetobreak = RND
' casse mortier pilon
If chancetobreak < 0.15 Then
Print "Your mortier pilon s'est cass‚ lors de l'op‚ration!"
mortarpestle = mortarpestle - 1
end if
ELSE
Print "You need 6 Seashells and a Mortar&pestle to make some Flux"
End if

Case 19 'Rope
IF (thread >= 20) AND (wax >= 2) THEN
thread = thread - 20
wax = wax - 2
hour = hour - 8
energy = energy - 25
warmth = warmth - 1
health = health - 1*rnd
hunger = hunger - 10
thirst = thirst - 10
hygiene = hygiene - 2
PRINT "After long hours, you have finally crafted a Rope."
ELSE
Print "You need 20 Threads and 2 wax to craft a Rope. It will take time to make one."
End if
     
Case 20 'Bone glue

IF (bone >= 10) AND (wood >= 1) AND (water >= 3) AND (cauldron = 1) then
bubbling& = _SNDOPEN("bubbling.mp3")
_SNDPLAY bubbling&
boneglue = boneglue + 1
bone = bone - 10
wood = wood - 1
water = water - 3
minutes = minutes + 30
energy = energy - 5
warmth = warmth - 1
health = health - 1*rnd
hunger = hunger - 2
thirst = thirst - 2
hygiene = hygiene - 2
PRINT "You have made some Bone glue"
ELSE
Print "You need a Cauldron, 10 bones, 1 Wood and 3 Water to make some Bone glue"
End if

Case 21 'Thread
IF (vine >= 1) AND (plant >= 1) Then
thread = thread + 1
vine = vine - 1
plant = plant - 1
hour = hour + 1
energy = energy - 5
health = health - 1*rnd
hunger = hunger - 2
thirst = thirst - 2
hygiene = hygiene - 1
PRINT "You have made a Thread"
ELSE
Print "You need a Vine and a Plant to make a Thread"
End if


Case 22 'Armors
cls
FOR s = 1 TO 8 STEP 2 'a etendre
PRINT s; armors(s),, s + 1; armors(s + 1),, s + 2; armors(s + 2)
NEXT s
print ""
Input " Select which armor to craft : ";choixarmors
print ""

SELECT CASE choixarmors
case 1 'chaussures en Hide
IF (skin >= 6) AND (thread >= 3) Then
thread = thread - 3
skin = skin - 6
skinshoes.equipmentcount = skinshoes.equipmentcount + 1
hour = hour + 4
energy = energy - 15
health = health - 1*rnd
hunger = hunger - 8
thirst = thirst - 8
hygiene = hygiene - 1
PRINT "You have made a pair of Hide shoes"
ELSE
Print "You need 6 Hides and 3 Threads to make a pair of Hide shoes"
End if
case 2 'casque en Hide
IF (skin >= 6) AND (thread >= 3) Then
thread = thread - 3
skin = skin - 6
skinhelmet.equipmentcount = skinhelmet.equipmentcount + 1
hour = hour + 3
energy = energy - 15
health = health - 1*rnd
hunger = hunger - 7
thirst = thirst - 7
hygiene = hygiene - 1
PRINT "You have made a Hide helmet"
ELSE
Print "You need 6 Hides and 3 Threads to make a Hide helmet"
End if
case 3 'armure en Hide
IF (skin >= 10) AND (thread >= 5) AND (boneglue >= 1) Then
boneglue = boneglue - 1
thread = thread - 5
skin = skin - 10
skinarmor.equipmentcount = skinarmor.equipmentcount + 1
hour = hour + 5
energy = energy - 20
health = health - 1*rnd
hunger = hunger - 11
thirst = thirst - 11
hygiene = hygiene - 2
PRINT "You have made a Hide armor"
ELSE
Print "You need 10 Hides, 5 Threads and 1 Bone glue to make a Hide armor"
End if
case 4 'hide gloves
IF (skin >= 5) AND (thread >= 2) Then
thread = thread - 2
skin = skin - 5
skingloves.equipmentcount = skingloves.equipmentcount + 1
hour = hour + 2
energy = energy - 15
health = health - 1*rnd
hunger = hunger - 7
thirst = thirst - 7
hygiene = hygiene - 1
PRINT "You have made a pair of Hide gloves"
ELSE
Print "You need 5 Hides and 2 Threads pour to make a pair of Hide gloves"
End if
case 5 'chaussures en Leather
IF (leather >= 6) AND (thread >= 3) Then
thread = thread - 3
leather = leather - 6
leathershoes.equipmentcount = leathershoes.equipmentcount + 1
hour = hour + 4
energy = energy - 15
health = health - 1*rnd
hunger = hunger - 8
thirst = thirst - 8
hygiene = hygiene - 1
PRINT "You have made a pair of Leather shoes"
ELSE
Print "You need 6 Leather and 3 Threads to make a pair of Leather shoes"
End if
case 6 'casque en Leather
IF (leather >= 6) AND (thread >= 3) Then
thread = thread - 3
leather = leather - 6
leatherhelmet.equipmentcount = leatherhelmet.equipmentcount + 1
hour = hour + 3
energy = energy - 15
health = health - 1*rnd
hunger = hunger - 7
thirst = thirst - 7
hygiene = hygiene - 1
PRINT "You have made a Leather helmet"
ELSE
Print "You need 6 Leather and 3 Threads to make a Leather helmet"
End if
case 7 'armure en Leather
IF (leather >= 10) AND (thread >= 5) AND (boneglue >= 1) Then
boneglue = boneglue - 1
thread = thread - 5
leather = leather - 10
leatherarmor.equipmentcount = leatherarmor.equipmentcount + 1
hour = hour + 5
energy = energy - 20
health = health - 1*rnd
hunger = hunger - 11
thirst = thirst - 11
hygiene = hygiene - 2
PRINT "You have made a Leather armor"
ELSE
Print "You need 10 Leather, 5 Threads and 1 Bone glue to make a Leather armor"
End if
case 8 'gants en Leather
IF (leather >= 5) AND (thread >= 2) Then
thread = thread - 2
leather = leather - 5
leathergloves.equipmentcount = leathergloves.equipmentcount + 1
hour = hour + 2
energy = energy - 15
health = health - 1*rnd
hunger = hunger - 7
thirst = thirst - 7
hygiene = hygiene - 1
PRINT "You have made a pair of Leather gloves"
ELSE
Print "You need 5 Leather and 2 Threads to make a pair of Leather gloves"
End if
case 9
case 10
case 11
case 12

end select



Case 23 'mortier pilon
IF (rock >= 2) AND (flint >= 2) AND (water >= 2) Then
rock = rock - 2
flint = flint - 2
water = water - 2
mortarpestle = mortarpestle + 1
hour = hour + 4
energy = energy - 17
health = health - 1*rnd
hunger = hunger - 7
thirst = thirst - 7
hygiene = hygiene - 1
PRINT "You have made a Mortar&pestle"
ELSE
Print "You need 2 Rocks, 2 Flint and 2 Water to make a Mortar&pestle"
End if

Case 24 'Leather
if (tanningtub >= 1) AND (skin >= 3) AND (bark >= 3) AND (water >= 10) then
PRINT "You have put some hide to turn into leather. You will need to wait 5 days for it to be ready"
energy = energy - 2
leatherstart = leatherstart + 1
skin = skin - 3
bark = bark - 3
water = water - 10
ELSE
Print "You need a tanning tub, 3 Hides, 3 Barks and 10 Water to make a piece of Leather"
End if


Case 25 'Bucket
if (wood >= 3) AND (wax >= 3) THEN
wood = wood - 3
wax = wax - 3
bucket = bucket + 1
hour = hour + 2
energy = energy - 17
health = health - 1*rnd
hunger = hunger - 7
thirst = thirst - 7
PRINT "You have made a bucket"
ELSE
Print "You need 3 Wood and 3 Wax to make a Bucket."
End if


Case 26 'Tar
if (wood >= 5) AND (bark >= 5) AND (bucket >= 1) THEN
PRINT "You started the process to make some tar. You will need to wait 3 days to collect it"
wood = wood - 5
bark = bark - 5
tarstart = tarstart + 1
energy = energy - 13

ELSE
Print "You need 5 Wood, 5 Bark and 1 Bucket to make Tar."
End if


Case 27 'medicaments '------------------------------------------
CLS
Print "The medicine will be consumed instantly after being concocted"
print ""
FOR s = 1 TO 14 STEP 2
PRINT s; medicine(s), s + 1; medicine(s + 1)
NEXT s
print ""
Input " Select the medicine you would like to concoct : ";choixmedicine
print ""

SELECT CASE choixmedicine
case 1 'Cataplasme de guimauve      (treat les abcŠs)
IF (abscess >= 1) AND (mortarpestle >= 1) AND (skin >= 1) AND (water >= 2) AND (marshmallow >= 5) Then
abscess = 0
skin = skin - 1
water = water - 2
marshmallow = marshmallow - 5
minutes = minutes + 20
energy = energy - 10
health = health - 1*rnd
hunger = hunger - 5
thirst = thirst - 5
hygiene = hygiene - 1
splat& = _SNDOPEN("splat.mp3")
_SNDPLAY splat&
chancetobreak = RND
' casse mortier pilon
If chancetobreak < 0.15 Then
Print "Your Mortal&pestle broke while grinding"
mortarpestle = mortarpestle - 1
End If
PRINT "You apply the marshmallow cataplasm on your abscess..."
_delay 2
print "You have healed your abscess!"
healthstatus = "Normal"
else
Print "You need 1 Mortar&pestle, 1 Hide, 5 Marshmallows, 2 Water and suffer from an abscess to make a marshmallow cataplasm"
End if

case 2 'D‚coction de noyer          (treat les angines)
IF (sorethroat >= 1) AND (mortarpestle >= 1) AND (wood >= 1) AND (water >= 10) AND (walnut >= 5) Then
sorethroat = 0
wood = wood - 1
water = water - 10
walnut = walnut - 5
minutes = minutes + 40
energy = energy - 10
health = health - 1*rnd
hunger = hunger - 5
thirst = thirst - 5
hygiene = hygiene - 1
chancetobreak = RND
' casse mortier pilon
If chancetobreak < 0.15 Then
Print "Your Mortal&pestle broke while grinding"
mortarpestle = mortarpestle - 1
End If
PRINT "You drink the hot walnut decoction to treat your throat..."
_delay 2
print "You have healed your sore throat!"
healthstatus = "Normal"
else
Print "You need 1 Mortar&pestle, 1 Wood, 5 Leafs de noyer, 10 Water and souffrir d'a angine to make a d‚coction de noyer."
End if
case 3 ' D‚coction de salsepareille  (treat l'asthme) 
IF (asthma >= 1) AND (mortarpestle >= 1) AND (wood >= 1) AND (water >= 10) AND (sarsaparilla >= 5) Then
asthma = 0
wood = wood - 1
water = water - 10
sarsaparilla = sarsaparilla - 5
minutes = minutes + 40
energy = energy - 10
health = health - 1*rnd
hunger = hunger - 5
thirst = thirst - 5
hygiene = hygiene - 1
chancetobreak = RND
' casse mortier pilon
If chancetobreak < 0.15 Then
Print "Your Mortal&pestle broke while grinding"
mortarpestle = mortarpestle - 1
End If
PRINT "You buvez la d‚coction de salsepareille chaude pour treatr votre asthme..."
_delay 2
print "You have soign‚ votre asthme !"
healthstatus = "Normal"
else
Print "You need 1 Mortar&pestle, 1 Wood, 5 salsepareille, 10 Water and souffrir d'asthme to make a d‚coction de salsepareille."
End if

case 4 'Mixture de myrte    +bark      (treat la bronchite)
IF (bronchitis >= 1) AND (mortarpestle >= 1) AND (wood >= 1) AND (bark >= 1) AND (water >= 10) AND (myrtle >= 5) Then
bronchitis = 0
bark = bark - 1
wood = wood - 1
water = water - 10
myrtle = myrtle - 5
minutes = minutes + 25
energy = energy - 10
health = health - 1*rnd
hunger = hunger - 5
thirst = thirst - 5
hygiene = hygiene - 1
chancetobreak = RND
' casse mortier pilon
If chancetobreak < 0.15 Then
Print "Your Mortal&pestle broke while grinding"
mortarpestle = mortarpestle - 1
End If
PRINT "You inhale the myrtle mixture to heal your bronchitis..."
_delay 2
print "You have healed your bronchitis !"
healthstatus = "Normal"
else
Print "You need 1 Mortar&pestle, 1 Wood, 1 Bark, 5 Myrtle, 10 Water and suffer from a bronchitis to make a myrtle mixture."
End if
case 5 'Infusion d'agripaume        (treat la diarrh‚e)
IF (diarrhea >= 1) AND (mortarpestle >= 1) AND (wood >= 1) AND (water >= 10) AND (motherwort >= 5) Then
diarrhea = 0
wood = wood - 1
water = water - 10
motherwort = motherwort - 5
minutes = minutes + 15
energy = energy - 10
health = health - 1*rnd
hunger = hunger - 5
thirst = thirst - 5
hygiene = hygiene - 1
chancetobreak = RND
' casse mortier pilon
If chancetobreak < 0.15 Then
Print "Your Mortal&pestle broke while grinding"
mortarpestle = mortarpestle - 1
End If
PRINT "You drink the motherwort infusion to treat your diarrhea..."
_delay 2
print "You have healed your diarrhea !"
healthstatus = "Normal"
else
Print "You need 1 Mortar&pestle, 1 Wood, 5 Motherwort, 10 Water and suffer from diarrhea to make a mortherwort infusion."
End if
case 6 ' borage infusion      (treat fever)
IF (fever >= 1) AND (mortarpestle >= 1) AND (wood >= 1) AND (water >= 10) AND (borage >= 5) Then
fever = 0
wood = wood - 1
water = water - 10
borage = borage - 5
minutes = minutes + 15
energy = energy - 10
health = health - 1*rnd
hunger = hunger - 5
thirst = thirst - 5
hygiene = hygiene - 1
chancetobreak = RND
' casse mortier pilon
If chancetobreak < 0.15 Then
Print "Your Mortal&pestle broke while grinding"
mortarpestle = mortarpestle - 1
End If
PRINT "You drink the borage infusion to treat your fever..."
_delay 2
print "You have healed your fever !"
healthstatus = "Normal"
else
Print "You need 1 Mortar&pestle, 1 Wood, 5 Borage, 10 Water and suffer from a fever to make a borage infusion."
End if
case 7 'Infusion d'eucalyptus      (treat the flu)

IF (flu >= 1) AND (mortarpestle >= 1) AND (wood >= 1) AND (water >= 10) AND (eucalyptus >= 5) Then
flu = 0
wood = wood - 1
water = water - 10
eucalyptus = eucalyptus - 5
minutes = minutes + 15
energy = energy - 10
health = health - 1*rnd
hunger = hunger - 5
thirst = thirst - 5
hygiene = hygiene - 1
chancetobreak = RND
' casse mortier pilon
If chancetobreak < 0.15 Then
Print "Your Mortal&pestle broke while grinding"
mortarpestle = mortarpestle - 1
End If
PRINT "You drink the eucalyptus infusion to treat your flu..."
_delay 2
print "You have healed from the flu !"
healthstatus = "Normal"
else
Print "You need 1 Mortar&pestle, 1 Wood, 5 Eucalyptus, 10 Water and suffer from the flu to make a eucalyptus infusion."
End if
case 8 'Infusion de joubarbe      (treat les infections)
IF (infection >= 1) AND (mortarpestle >= 1) AND (wood >= 1) AND (water >= 10) AND (houseleek >= 5) Then
infection = 0
wood = wood - 1
water = water - 10
houseleek = houseleek - 5
minutes = minutes + 15
energy = energy - 10
health = health - 1*rnd
hunger = hunger - 5
thirst = thirst - 5
hygiene = hygiene - 1
chancetobreak = RND
' casse mortier pilon
If chancetobreak < 0.15 Then
Print "Your Mortal&pestle broke while grinding"
mortarpestle = mortarpestle - 1
End If
PRINT "You drink the houseleek infusion to treat your infection..."
_delay 2
print "You have cured your infection !"
healthstatus = "Normal"
else
Print "You need 1 Mortar&pestle, 1 Wood, 5 Borage, 10 Water and suffer from an infection to make a houseleek infusion."
End if
case 9 'Mixture de lierre terrestre (treat le rhume) 
IF (commoncold >= 1) AND (mortarpestle >= 1) AND (bark >= 1) AND (wood >= 1) AND (water >= 10) AND (groundivy >= 5) Then
commoncold = 0
wood = wood - 1
bark = bark - 1
water = water - 10
groundivy = groundivy - 5
minutes = minutes + 15
energy = energy - 10
health = health - 1*rnd
hunger = hunger - 5
thirst = thirst - 5
hygiene = hygiene - 1
chancetobreak = RND
' casse mortier pilon
If chancetobreak < 0.15 Then
Print "Your Mortal&pestle broke while grinding"
mortarpestle = mortarpestle - 1
End If
PRINT "You inhale the ground ivy mixture to cure your cold..."
_delay 2
print "You have cured your cold!"
healthstatus = "Normal"
else
Print "You need 1 Mortar&pestle, 1 Wood, 1 Bark, 5 Ground ivy, 10 Water and suffer from a cold to make a mixture of ground ivy."
End if
case 10 'cataplasme d'euphraise        (treat conjonctivite) 

IF (conjunctivitis >= 1) AND (mortarpestle >= 1) AND (skin >= 1) AND (water >= 2) AND (euphrasia >= 5) Then
conjunctivitis = 0
skin = skin - 1
water = water - 2
euphrasia = euphrasia - 5
minutes = minutes + 20
energy = energy - 10
health = health - 1*rnd
hunger = hunger - 5
thirst = thirst - 5
hygiene = hygiene - 1
splat& = _SNDOPEN("splat.mp3")
_SNDPLAY splat&
chancetobreak = RND
' casse mortier pilon
If chancetobreak < 0.15 Then
Print "Your Mortal&pestle broke while grinding"
mortarpestle = mortarpestle - 1
End If
PRINT "You apply the euphrasia cataplasm on your conjunctivitis..."
_delay 2
print "You have cured your conjunctivitis!"
healthstatus = "Normal"
else
Print "You need 1 Mortar&pestle, 1 Hide, 5 Euphrasia, 2 Water and suffer from conjunctivitis to make an euphrasia cataplasm."
End if

case 11 'infusion de cynorrhodon  +10 health
IF (wood >= 1) AND (water >= 10) AND (rosehip >= 7) Then
wood = wood - 1
water = water - 10
rosehip = rosehip - 7
minutes = minutes + 15
energy = energy - 10
hunger = hunger - 5
thirst = thirst - 5
hygiene = hygiene - 1
health = health + 10
PRINT "You drink the rosehip infusion to heal 10 health points."
else
Print "You need 1 Wood, 7 rosehips and 10 Water to make a rosehip infusion."
End if

case 12 'bWaterme de cynorrhodon + 30 health
IF (fat >= 2) AND (wood >= 1) AND (water >= 10) AND (rosehip >= 20) AND (cauldron = 1) Then
fat = fat - 2
wood = wood - 1
water = water - 10
rosehip = rosehip - 20
minutes = minutes + 45
energy = energy - 10
hunger = hunger - 5
thirst = thirst - 5
hygiene = hygiene - 5
health = health + 30
splat& = _SNDOPEN("splat.mp3")
_SNDPLAY splat&
PRINT "You apply the rosehip balm to heal 30 health points."
else
Print "You need 1 Wood, 20 Rosehip, 2 Far, 10 Water and a cauldron to make a rosehip balm."
End if

case 13 'antidote
IF (lightpoison >= 1) AND (snakevenom >= 1) AND (sarsaparilla >= 1) AND (marshmallow >= 1) AND (rosehip >= 2) AND (eucalyptus >= 1) aND (water >= 5) AND (cauldron = 1) Then
snakevenom = snakevenom - 1
sarsaparilla = sarsaparilla - 1
marshmallow = marshmallow - 1
rosehip = rosehip - 2
eucalyptus = eucalyptus - 1
water = water - 5
minutes = minutes + 45
energy = energy - 10
hunger = hunger - 5
thirst = thirst - 5
hygiene = hygiene - 5
lightpoison = 0
splat& = _SNDOPEN("splat.mp3")
_SNDPLAY splat&
PRINT "You drink the antidote you have prepared..."
_delay 2
print "You have cured your poisoning"
healthstatus = "Normal"
else
Print "You need 1 Snake venom, 1 sarsaparilla, 1 Marshmallow, 2 Rosehips, 1 Eucalyptus, 5 Water, a cauldron and be poisoned to prepare an antidote"
End if
case 14 '??
end select


Case 28 'papier

IF (leaf >= 7) AND (wood >= 2) AND (water >= 10) AND (paperpress = 1) then
leaf = leaf - 7
wood = wood - 2
water = water - 10
hour = hour + 2
energy = energy - 6
warmth = warmth - 1
health = health - 1*rnd
hunger = hunger - 3
thirst = thirst - 4
hygiene = hygiene - 2
PRINT "You have made some paper"
ELSE
Print "You need 7 Leaves, 2 Wood, 10 Water and a paper press to make paper"
End if
Case 29 ' materiel de dessin --------------------------
If (paper >= 3) AND (wax >= 3) AND (borage >= 2) AND (stjohnwort >= 2) AND (marshmallow >= 2) AND (euphrasia >= 2) AND (cauldron = 1) Then
drawingmats = drawingmats + 1
paper = paper - 3
wax = wax - 3
borage = borage - 2
stjohnwort = stjohnwort - 2
marshmallow = marshmallow - 2
euphrasia = euphrasia - 2
hour = hour + 1
energy = energy - 6
warmth = warmth - 1
health = health - 1*rnd
hunger = hunger - 5
thirst = thirst - 5
hygiene = hygiene - 2
PRINT "You have made some drawing materials"
ELSE
Print "You need 3 Paper, 3 Wax, 2 Borage, 2 St.John wort, 2 Marshmallows, 2 Euphrasia and a cauldron to make some drawing materials."
End if

Case 30 ' carte de l'ile
    If map = 1 then
print "You already have a map of the island."
elseIF (paper >= 16) AND (drawingmats >= 1) then
map = 1
paper = paper - 16
energy = energy - 10
hour = hour + 2
energy = energy - 6
warmth = warmth - 1
health = health - 1*rnd
hunger = hunger - 3
thirst = thirst - 4
hygiene = hygiene - 2
PRINT "You have drawn a map of the island"
ELSE
Print "You need 16 Paper and Drawing materials to draw a map of the island."
End if
Case 31
Case 32
Case 33
Case 34
Case 35
Case 36
Case 37
Case 38
Case 39
Case 40
Case 41
Case 42
Case 43
Case 44
Case 45
Case 46
Case 47
End Select

sleep

Case 12 ' chercher Wood and Rock
rock = rock + int (2*rnd+1)
wood = wood + int (2*rnd+1)
energy = energy - 19
                hour = hour + 1
hunger = hunger - 9
                thirst = thirst - 9
warmth = warmth - 2
health = health - 1.5*rnd
hygiene = hygiene - 2

print "You picked up Rocks and Wood :"
print ""
Print "  Rock : " rock
print "  Wood  : " wood
sleep

Case 13 'chercher des objets specifiques ----------------------------------------------- NESTED CASE
CLS
FOR s = 1 TO 15 STEP 3 '---------------------------------------------------------------------------- a remettre a 30
PRINT s; gather(s),,, s + 1; gather(s + 1),,, s + 2; gather(s + 2)
NEXT s
print ""
Input " Select what you would like to gather : ";choixobjet
print ""

SELECT CASE choixobjet

Case 1 'Rock
rock = rock + 1
minutes = minutes + 10
energy = energy - 10
hunger = hunger - 3
                thirst = thirst - 3
warmth = warmth - 1
health = health - 1.5*rnd
print "You pick up a rock, not far from your settlement"
Print "Rocks left : " rock
print ""
print "Current hunger  : " hunger
print "Current thirst  : " thirst
print "Current energy  : " energy
sleep

Case 2 'Wood
If ironaxe.equipmentcount >= 1 then
chop& = _SNDOPEN("chop.mp3")
_SNDPLAY chop&
'son coupe Wood
wood = wood + 8
minutes = minutes + 30
energy = energy - 10
hunger = hunger - 5
thirst = thirst - 5
health = health - 1.5*rnd
hygiene = hygiene - 2

print "You have chopped some wood with an Iron axe"
Print "Wood left : " wood
print ""
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy    : " energy

' Generate a random number between 0 and 1 for a chance to break
  chancetobreak = RND

  ' Check if the tool has broken
  If chancetobreak < 0.01 Then
Print "Your Iron axe broke."
ironaxe.equipmentcount = ironaxe.equipmentcount - 1
  End If
  Sleep
 
elseif copperaxe.equipmentcount >= 1 then
chop& = _SNDOPEN("chop.mp3")
_SNDPLAY chop&
'son coupe Wood
wood = wood + 5
minutes = minutes + 20
energy = energy - 10
hunger = hunger - 4
thirst = thirst - 4
warmth = warmth - 1
health = health - 1.5*rnd
hygiene = hygiene - 2
print "You have chopped some wood with a Copper axe"
Print "Wood left : " wood
print ""
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy : " energy
sleep



' Generate a random number between 0 and 1 for a chance to break
  chancetobreak = RND

If chancetobreak < 0.01 Then
Print "Your Copper axe broke!"
copperaxe.equipmentcount = copperaxe.equipmentcount - 1
  End If
  Sleep


elseif stoneaxe.equipmentcount >= 1 then
chop& = _SNDOPEN("chop.mp3")
_SNDPLAY chop&
'son coupe Wood
wood = wood + 3
minutes = minutes + 15
energy = energy - 10
hunger = hunger - 3
thirst = thirst - 3
warmth = warmth - 1
health = health - 1.5*rnd
hygiene = hygiene - 1
print "You have coup‚ some Wood with a Stone axe"
Print "Wood left : " wood
print ""
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy : " energy
sleep



' Generate a random number between 0 and 1 for a chance to break
  chancetobreak = RND
 
 
If chancetobreak < 0.15 Then
Print "Your Stone axe broke!"
stoneaxe.equipmentcount = stoneaxe.equipmentcount - 1
  End If
  Sleep
 
else
wood = wood + 1
minutes = minutes + 15
energy = energy - 10
hunger = hunger - 4
thirst = thirst - 4
warmth = warmth - 1
health = health - 1.5*rnd
hygiene = hygiene - 2
print "You picked up some wood by hand from the ground."
Print "Wood left : " wood
print ""
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy    : " energy
sleep
end if

Case 3 'Leafs
leaf = leaf + 2
minutes = minutes + 10
energy = energy - 5
hunger = hunger - 3
                thirst = thirst - 3
health = health - 2*rnd
print "You have picked up some leaves"
Print "Leaves left : " leaf
print ""
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy    : " energy
sleep

Case 4 'Clay with pelle ou sans

If ironshovel >= 1 then

minutes = minutes + 20
energy = energy - 11
hunger = hunger - 3
thirst = thirst - 3
warmth = warmth - 1
health = health - 2*rnd
hygiene = hygiene - 2
claycollected = 8
print "You have dug some clay with an iron shovel"
print "Clay collected : " claycollected
clay = clay + claycollected
Print "Clay left : " clay
print ""
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy    : " energy

' Generate a random number between 0 and 1 for a chance to break
  chancetobreak = RND

  ' Check if the shovel has broken
  If chancetobreak < 0.01 Then
  print ""
Print "Your Iron shovel broke"
ironshovel = ironshovel - 1
_delay 1
end if
elseIf coppershovel >= 1 then
minutes = minutes + 15
energy = energy - 10
hunger = hunger - 3
thirst = thirst - 3
warmth = warmth - 1
health = health - 2*rnd
hygiene = hygiene - 1
claycollected = 5
print "You have dug some clay with a copper shovel"
print "Clay collected : " claycollected
clay = clay + claycollected
Print "Clay left : " clay
print ""
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy    : " energy

' Generate a random number between 0 and 1 for a chance to break
  chancetobreak = RND

  ' Check if the shovel has broken
  If chancetobreak < 0.02 Then
  print ""
Print "Your Copper shovel broke"
coppershovel = coppershovel - 1
_delay 1
  end if

elseIf woodshovel >= 1 then
minutes = minutes + 15
energy = energy - 10
hunger = hunger - 3
thirst = thirst - 3
warmth = warmth - 1
health = health - 2*rnd
hygiene = hygiene - 1
claycollected = 3
print "You have dug some Clay with a Wooden shovel"
print "Clay collected : " claycollected
clay = clay + claycollected
Print "Clay left : " clay
print ""
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy    : " energy

' Generate a random number between 0 and 1 for a chance to break
  chancetobreak = RND

  ' Check if the shovel has broken
  If chancetobreak < 0.17 Then
  print ""
Print "Your Wooden shovel broke"
woodshovel = woodshovel - 1
_delay 1
  end if
 


else
clay = clay + 1
minutes = minutes + 15
energy = energy - 10
hunger = hunger - 4
thirst = thirst - 4
warmth = warmth - 1
health = health - 2*rnd
hygiene = hygiene - 2
print "You picked up some clay with your hands"
Print "Clay left : " clay
print ""
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy    : " energy
sleep
end if

sleep

Case 5 'Flint
flint = flint + 1
minutes = minutes + 10
energy = energy - 10
hunger = hunger - 3
                thirst = thirst - 3
warmth = warmth - 1
health = health - 2*rnd
print "You picked up some Flint"
Print "Flint left : " flint
print ""
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy    : " energy
sleep

Case 6 'Vine
vine = vine + 1
minutes = minutes + 10
energy = energy - 10
hunger = hunger - 3
                thirst = thirst - 3
warmth = warmth - 1
health = health - 2*rnd
print "You picked up a Vine"
Print "Vines left : " vine
print ""
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy    : " energy
sleep

Case 7 'herbes medicinales
CLS
FOR s = 1 TO 13 STEP 2
PRINT s; herbs(s),, s + 1; herbs(s + 1)
NEXT s
print ""
Input " Select the medicinal herb to gather : ";choixherb
print ""

select case choixherb
case 1 'agripaume
motherwort = motherwort + 1
minutes = minutes + 50
energy = energy - 10
hunger = hunger - 3
thirst = thirst - 3
warmth = warmth - 1
health = health - 2*rnd
print "You picked up some motherwort"
Print "Motherwort left : " motherwort
print ""
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy    : " energy


CASE 2 'joubarbe
houseleek = houseleek + 1
minutes = minutes + 50
energy = energy - 10
hunger = hunger - 3
thirst = thirst - 3
warmth = warmth - 1
health = health - 2*rnd
print "You picked up some houseleek"
Print "Houseleek left : " houseleek
print ""
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy    : " energy


CASE 3 'millepertuis
stjohnwort = stjohnwort + 1
minutes = minutes + 50
energy = energy - 10
hunger = hunger - 3
thirst = thirst - 3
warmth = warmth - 1
health = health - 2*rnd
print "You picked up some St.John wort"
Print "St.John wort left : " stjohnwort
print ""
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy    : " energy
CASE 4 'cynorrhodon
rosehip = rosehip + 1
minutes = minutes + 50
energy = energy - 10
hunger = hunger - 3
thirst = thirst - 3
warmth = warmth - 1
health = health - 5*rnd
print "You picked up some rosehips"
Print "Rosehips left : " rosehip
print ""
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy    : " energy
CASE 5 'bourrache
borage = borage + 1
minutes = minutes + 50
energy = energy - 10
hunger = hunger - 3
thirst = thirst - 3
warmth = warmth - 1
health = health - 2*rnd
print "You picked up some borage"
Print "Borage left : " borage
print ""
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy    : " energy
CASE 6 'eucalyptus
eucalyptus = eucalyptus + 1
minutes = minutes + 50
energy = energy - 10
hunger = hunger - 3
thirst = thirst - 3
warmth = warmth - 1
health = health - 2*rnd
print "You picked up some eucalyptus"
Print "Eucalyptus left : " eucalyptus
print ""
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy    : " energy
CASE 7 'quinteLeaf
cinquefoil = cinquefoil + 1
minutes = minutes + 50
energy = energy - 10
hunger = hunger - 3
thirst = thirst - 3
warmth = warmth - 1
health = health - 2*rnd
print "You picked up some cinquefoil"
Print "QuinteLeaf left : " cinquefoil
print ""
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy : " energy
CASE 8 'myrte
myrtle = myrtle + 1
minutes = minutes + 50
energy = energy - 10
hunger = hunger - 3
thirst = thirst - 3
warmth = warmth - 1
health = health - 2*rnd
print "You picked up some myrtle"
Print "Myrtle left : " myrtle
print ""
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy    : " energy
CASE 9 'euphraise
euphrasia = euphrasia + 1
minutes = minutes + 50
energy = energy - 10
hunger = hunger - 3
thirst = thirst - 3
warmth = warmth - 1
health = health - 2*rnd
print "You picked up some euphrasia"
Print "Euphrasia left : " euphrasia
print ""
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy    : " energy
CASE 10 'lierre terrestre
groundivy = groundivy + 1
minutes = minutes + 50
energy = energy - 10
hunger = hunger - 3
thirst = thirst - 3
warmth = warmth - 1
health = health - 2*rnd
print "You picked up some ground ivy"
Print "Ground ivy left : " groundivy
print ""
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy    : " energy
CASE 11 'guimauve
marshmallow = marshmallow + 1
minutes = minutes + 50
energy = energy - 10
hunger = hunger - 3
thirst = thirst - 3
warmth = warmth - 1
health = health - 2*rnd
print "You picked up some marshmallow"
Print "Marshmallow left : " marshmallow
print ""
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy    : " energy
CASE 12 'salsepareille
sarsaparilla = sarsaparilla + 1
minutes = minutes + 50
energy = energy - 10
hunger = hunger - 3
thirst = thirst - 3
warmth = warmth - 1
health = health - 2*rnd
print "You picked up some sarsaparilla"
Print "Sarsaparilla left : " sarsaparilla
print ""
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy    : " energy
case 13 'noyer
walnut = walnut + 1
minutes = minutes + 50
energy = energy - 10
hunger = hunger - 3
thirst = thirst - 3
warmth = warmth - 1
health = health - 2*rnd
print "You picked up some walnut leaves"
Print "Walnut leaves left : " walnut
print ""
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy    : " energy
End select
sleep

Case 8 'Plant
plant = plant + 1
minutes = minutes + 10
energy = energy - 10
hunger = hunger - 3
                thirst = thirst - 3
warmth = warmth - 1
health = health - 2*rnd
print "You picked up a Plant"
Print "Plants left : " plant
print ""
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy    : " energy
sleep


Case 9 'Bark
bark = bark + 1
minutes = minutes + 10
energy = energy - 10
hunger = hunger - 3
                thirst = thirst - 3
warmth = warmth - 1
health = health - 2*rnd
hygiene = hygiene - 1
print "You picked up some bark"
Print "Bark left : " bark
print ""
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy    : " energy
sleep

Case 10 'Seashell
kokiyas = kokiyas + 1
minutes = minutes + 8
energy = energy - 5
hunger = hunger - 3
                thirst = thirst - 3
warmth = warmth - 1
health = health - 2*rnd
print "You picked up a Seashell"
Print "Seashells left : " kokiyas
print ""
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy    : " energy
sleep

Case 11 'Sand
sand = sand + 1
minutes = minutes + 5
energy = energy - 5
hunger = hunger - 3
                thirst = thirst - 3
warmth = warmth - 1
health = health - 2*rnd
hygiene = hygiene - 1
print "You picked some Sand"
Print "Sand left : " sand
print ""
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy    : " energy
sleep

Case 12 'os

chancebone = Rnd

IF chancebone < 0.70 THEN
bone = bone + 1
minutes = minutes + 20
energy = energy - 6
hunger = hunger - 3
thirst = thirst - 3
warmth = warmth - 1
health = health - 2*rnd
hygiene = hygiene - 2
print "You picked up a bone"
Print "Bones left : " bone
print ""
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy    : " energy
sleep

Else
print "After long minutes, you didn't find any bone..."
minutes = minutes + 20
energy = energy - 5
hunger = hunger - 3
thirst = thirst - 3
warmth = warmth - 1
health = health - 2*rnd
hygiene = hygiene - 1
print ""
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy    : " energy
end if
sleep



Case 13 'minerai cuivre 'pickaxe?


If ironpickaxe >= 1 then
'son coupe Wood
copperore = copperore + 6
minutes = minutes + 30
energy = energy - 16
hunger = hunger - 5
thirst = thirst - 5
health = health - 2*rnd
hygiene = hygiene - 2

print "You mined some copper ore with an Iron pickaxe"
Print "Copper ore left : " copperore
print ""
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy    : " energy

' Generate a random number between 0 and 1 for a chance to break
  chancetobreak = RND

  ' Check if the tool has broken
  If chancetobreak < 0.05 Then
Print "Your Iron pickaxe broke!"
ironpickaxe = ironpickaxe - 1
  End If
  Sleep
 
elseif copperpickaxe >= 1 then
'son coupe Wood
copperore = copperore + 4
minutes = minutes + 20
energy = energy - 12
hunger = hunger - 4
thirst = thirst - 4
warmth = warmth - 1
health = health - 2*rnd
hygiene = hygiene - 2
print "You mine some copper ore with a copper pickaxe"
Print "Copper ore left : " copperore
print ""
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy    : " energy
sleep


chancetobreak = RND

If chancetobreak < 0.05 Then
Print "Your Copper pickaxe broke!"
copperpickaxe = copperpickaxe - 1
End If
  Sleep
else

chancecopperore = Rnd

IF chancecopperore < 0.50 THEN
copperore = copperore + 1
minutes = minutes + 35
energy = energy - 10
hunger = hunger - 4
thirst = thirst - 4
warmth = warmth - 1
health = health - 2*rnd
hygiene = hygiene - 2
print "You picked some Copper ore"
Print "Copper ore left : " copperore
print ""
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy    : " energy
sleep

ELSEIF chancecopperore < 0.75 THEN
print "You didn't find any copper ore"
minutes = minutes + 35
energy = energy - 8
hunger = hunger - 3
thirst = thirst - 3
warmth = warmth - 1
health = health - 2*rnd
hygiene = hygiene - 1
print ""
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy    : " energy
sleep

ELSEIF chancecopperore < 1 THEN
print "You find some copper ore but it is encrusted in some rock. It won't budge without the proper tool."
minutes = minutes + 35
energy = energy - 8
hunger = hunger - 3
thirst = thirst - 3
warmth = warmth - 1
health = health - 2*rnd
hygiene = hygiene - 1
print ""
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy    : " energy

sleep
end if
end if



Case 14 'minerai fer' pickaxe?
If ironpickaxe >= 1 then
'son coupe Wood
ironore = ironore + 5
minutes = minutes + 30
energy = energy - 16
hunger = hunger - 5
thirst = thirst - 5
health = health - 2*rnd
hygiene = hygiene - 2

print "You mined some Iron ore with an Iron pickaxe"
Print "Iron ore left : " ironore
print ""
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy    : " energy

' Generate a random number between 0 and 1 for a chance to break
  chancetobreak = RND

  ' Check if the tool has broken
  If chancetobreak < 0.05 Then
Print "Your Iron pickaxe broke!"
ironpickaxe = ironpickaxe - 1
  End If
  Sleep
 
elseif copperpickaxe >= 1 then
'son coupe Wood
ironore = ironore + 3
minutes = minutes + 20
energy = energy - 12
hunger = hunger - 4
thirst = thirst - 4
warmth = warmth - 1
health = health - 2*rnd
hygiene = hygiene - 2
print "You picked up some Iron ore with a Copper pickaxe"
Print "Iron ore left : " ironore
print ""
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy    : " energy
sleep

If chancetobreak < 0.05 Then
Print "Your Copper pickaxe broke!"
copperpickaxe = copperpickaxe - 1
  End If
  Sleep
else  
 
chanceironore = Rnd

IF chanceironore < 0.40 THEN
ironore = ironore + 1
minutes = minutes + 35
energy = energy - 7
hunger = hunger - 4
thirst = thirst - 4
warmth = warmth - 1
health = health - 2*rnd
hygiene = hygiene - 2
print "You picked up some Iron ore"
Print "Iron ore left : " ironore
print ""
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy    : " energy
sleep

ELSEIF chanceironore < 0.75 THEN
print "You didn't find any iron ore"
minutes = minutes + 35
energy = energy - 5
hunger = hunger - 3
thirst = thirst - 3
warmth = warmth - 1
health = health - 2*rnd
hygiene = hygiene - 1
print ""
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy    : " energy
sleep

ELSEIF chanceironore < 1 THEN
print "You find some Iron ore, but it is encrusted in rock. It won't budge without the proper tool..."
minutes = minutes + 35
energy = energy - 5
hunger = hunger - 3
thirst = thirst - 3
warmth = warmth - 1
health = health - 2*rnd
hygiene = hygiene - 1
print ""
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy    : " energy

sleep
end if
end if

Case 15 'Coal' pickaxe?

If ironpickaxe >= 1 then
'son coupe Wood
coal = coal + 7
minutes = minutes + 30
energy = energy - 16
hunger = hunger - 5
thirst = thirst - 5
health = health - 2*rnd
hygiene = hygiene - 2

print "You mined some Coal with an Iron pickaxe"
Print "Coal left : " coal
print ""
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy    : " energy

' Generate a random number between 0 and 1 for a chance to break
  chancetobreak = RND

  ' Check if the tool has broken
  If chancetobreak < 0.05 Then
Print "Your Iron pickaxe broke!"
ironpickaxe = ironpickaxe - 1
  End If
  Sleep
 
elseif copperpickaxe >= 1 then
'son coupe Wood
coal = coal + 5
minutes = minutes + 20
energy = energy - 12
hunger = hunger - 4
thirst = thirst - 4
warmth = warmth - 1
health = health - 2*rnd
hygiene = hygiene - 2
print "You mined some Coal with a Copper pickaxe"
Print "Coal left : " coal
print ""
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy    : " energy
sleep

If chancetobreak < 0.05 Then
Print "Your Copper pickaxe broke!"
copperpickaxe = copperpickaxe - 1
  End If
  Sleep
else

chancecoal = Rnd

IF chancecoal < 0.60 THEN
coal = coal + 1
minutes = minutes + 35
energy = energy - 7
hunger = hunger - 4
thirst = thirst - 4
warmth = warmth - 1
health = health - 2*rnd
hygiene = hygiene - 2
print "You picked up some Coal"
Print "Coal left : " coal
print ""
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy    : " energy
sleep

ELSEIF chancecoal < 0.75 THEN
print "You didn't find any Coal"
minutes = minutes + 35
energy = energy - 5
hunger = hunger - 3
thirst = thirst - 3
warmth = warmth - 1
health = health - 2*rnd
hygiene = hygiene - 1
print ""
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy    : " energy
sleep

ELSEIF chanceironore < 1 THEN
print "You find some Coal, but it is encrusted in rock. It won't budge without the proper tool..."
minutes = minutes + 35
energy = energy - 5
hunger = hunger - 3
thirst = thirst - 3
warmth = warmth - 1
health = health - 2*rnd
hygiene = hygiene - 1
print ""
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy    : " energy

sleep
end if
end if


Case 16 'encore vide
print ""
Case 17
print ""
Case 18
print ""
Case 19
print ""
Case 20
print ""
Case 21
print ""
Case 22
print ""
Case 23
print ""
Case 24
print ""
Case 25
print ""
Case 26
print ""
Case 27
print ""
Case 28
print ""
Case 29
print ""
Case 30
print ""


END SELECT




       
CASE 14 ' Utiliser... / Passer a demi-heure
' CLS
' health = 100
' energy = 100
' hygiene = 100
' warmth = 100
' hunger = 100
' food = 100
' water = 100
' thirst = 100
minutes = minutes + 30
        energy = energy - 3
hunger = hunger - 2
thirst = thirst - 2
health = health - 1
warmth = warmth - 1
hygiene = hygiene - 1
If minutes >= 60 THEN
            hour = hour +1
            minutes = minutes -60
end if
        Print "Half an hour has passed"
sleep




       
Case 15 'Passer a heure
        hour = hour + 1
        energy = energy - 5
hunger = hunger - 3
thirst = thirst - 3
health = health - 2
warmth = warmth - 2
hygiene = hygiene - 2
        Print "An hour has passed"
sleep
       
Case 16 '‚cran de statistiques
CLS

print ""
        Print "Status :"
print ""

PRINT "  Day" ; day
Print "  Hour" hour
print "  Minutes" minutes

print ""

energyBar$ = ""
       
        FOR a = 1 TO INT(energy/MAX_VALUE*100)
        COLOR Green
        energyBar$ = energyBar$ + "Û" ' Add a block character
        NEXT a
       
        PRINT "  Energy:      "; energyBar$

print " "energy

        healthBar$ = ""
       
        FOR b = 1 TO INT(health/MAX_VALUE*100)
        COLOR Red
        healthBar$ = healthBar$ + "Û" ' Add a block character
        NEXT b
       
        PRINT "  Health:      "; healthBar$

print " "health

hungerBar$ = ""

FOR c = 1 TO INT(hunger/MAX_VALUE*100)
        COLOR Orange
        hungerBar$ = hungerBar$ + "Û" ' Add a block character
        NEXT c
       
        PRINT "  Hunger:      "; hungerBar$

print " "hunger

thirstBar$ = ""

FOR d = 1 TO INT(thirst/MAX_VALUE*100)
        COLOR Blue
        thirstBar$ = thirstBar$ + "Û" ' Add a block character
        NEXT d
       
        PRINT "  Thirst:      "; thirstBar$

print " "thirst

warmthBar$ = ""

FOR g = 1 TO INT(warmth/MAX_VALUE*100)
        COLOR LightSalmon
        warmthBar$ = warmthBar$ + "±" ' Add a block character
        NEXT g
       
        PRINT "  Warmth:      "; warmthBar$

print " "warmth

COLOR YellowGreen 'pour que la couleur ne deborde pas quand la stat est a 0

hygieneBar$ = ""

FOR g = 1 TO INT(hygiene/MAX_VALUE*100)
        COLOR YellowGreen
        hygieneBar$ = hygieneBar$ + "±" ' Add a block character
        NEXT g
       
        PRINT "  Hygiene:    "; hygieneBar$

print " "hygiene

COLOR Chocolate 'pour que la couleur ne deborde pas quand la stat est a 0

foodBar$ = ""

FOR e = 1 TO INT(food/MAX_VALUE*100)
        COLOR Chocolate
        foodBar$ = foodBar$ + "°" ' Add a block character
        NEXT e
       
        PRINT "  Food:        "; foodBar$

print " "food

COLOR Indigo 'pour que la couleur ne deborde pas quand la stat est a 0

waterBar$ = ""

FOR f = 1 TO INT(water/MAX_VALUE*100)
        COLOR RoyalBlue
        waterBar$ = waterBar$ + "°" ' Add a block character
        NEXT f
       
        PRINT "  Water:      "; waterBar$
print " "water
print ""

Color White 'retour au blanc

' un sleep and un CLS quand il y aura bWatercoup de constructions

print "  Buildings :"
if shelter = 1 then
print "  Shelter                ";
Color Green : print "(+35 energy when resting)"
color White
else
end if

if bed = 1 then
Print "  Bed                    ";
color Green : print "(+5 energy when resting)"
color White
else
end if

if watercollector = 1 then
Print "  Water collector        ";
color RoyalBlue : print "(+10 water every day)"
color White
else
end if

if firering = 1 then
Print "  Campfire              ";
color LightSalmon : print "(More warmth when making a fire)"
color White
else
end if

if paperpress = 1 then
Print "  Paper press            ";
color White : print "(Can craft paper)"
color White
else
end if

if clayworkshop = 1 then
Print "  Clay workshop          ";
color Wheat : print "(Can craft clay items)"
color White
else
end if

if basicforge = 1 then
Print "  Basic forge            ";
color White : print "(Can smelt ore and forge metal tools)"
color White
else
end if

if brickshelter = 1 then
print "  Brick shelter          ";
Color Green : print "(+45 energy when resting, replaces the base shelter)"
color White
else
end if

if cauldron = 1 then
print "  Cauldron              ";
Color PaleGreen : print "(Can boil many things)"
color White
else
end if

if fireplace = 1 then
print "  Fireplace              ";
Color DarkOrange : print "(+10 warmth every day)"
color White
else
end if

if tanningtub = 1 then
print "  Tanning tub            ";
Color SaddleBrown : print "(Allows tanning leather)"
color White
else
end if

if tarkiln = 1 then
print "  Tar kiln              ";
Color DimGray : print "(Allows making tar)"
color White
else
end if

print ""
print ""
print ""
print ""
print ""


locate 4,17
print "Defense without equipment : " defense
locate 5,17
print "Damage without equipment  : " damage
sleep

Case 17 ' obsolete pour le moment
CLS
Print "  Inventory"
print ""

If rock >= 1 Then
rock& = _LOADIMAGE("rock.png", 32)
print "  Rock            :" rock; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), rock&
print ""
_FREEIMAGE rock&
Else
end if

If wood >= 1 Then
wood& = _LOADIMAGE("wood.png", 32)
print "  Wood            :" wood; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), wood&
print ""
_FREEIMAGE wood&
Else
end if

If leaf >= 1 Then
leaf& = _LOADIMAGE("leaf.png", 32)
print "  Leaf            :" leaf; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), leaf&
print ""
_FREEIMAGE leaf&
Else
end if

If clay >= 1 Then
clay& = _LOADIMAGE("clay.png", 32)
print "  Clay            :" clay; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), clay&
print ""
_FREEIMAGE clay&
Else
end if

If flint >= 1 Then
flint& = _LOADIMAGE("flint.png", 32)
print "  Flint            :" flint; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), flint&
print ""
_FREEIMAGE flint&
Else
end if

If vine >= 1 Then
vine& = _LOADIMAGE("vine.png", 32)
print "  Vines            :" vine; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), vine&
print ""
_FREEIMAGE vine&
Else
end if

If plant >= 1 Then
plant& = _LOADIMAGE("plant.png", 32)
print "  Plants          :" plant; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), plant&
print ""
_FREEIMAGE plant&
Else
end if

If bark >= 1 Then
bark& = _LOADIMAGE("bark.png", 32)
print "  Bark            :" bark; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), bark&
print ""
_FREEIMAGE bark&
Else
end if

If kokiyas >= 1 Then
kokiyas& = _LOADIMAGE("kokiyas.png", 32)
print "  Seashells        :" kokiyas; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), kokiyas&
print ""
_FREEIMAGE kokiyas&
Else
end if

If sand >= 1 Then
sand& = _LOADIMAGE("sand.png", 32)
print "  Sand            :" sand; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), sand&
print ""
_FREEIMAGE sand&
Else
end if

If bone >= 1 Then
bone& = _LOADIMAGE("bone.png", 32)
print "  Bone            :" bone; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), bone&
print ""
_FREEIMAGE bone&
Else
end if

If copperore >= 1 Then
copperore& = _LOADIMAGE("copperore.png", 32)
print "  Copper ore      :" copperore; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), copperore&
print ""
_FREEIMAGE copperore&
Else
end if

If ironore >= 1 Then
ironore& = _LOADIMAGE("ironore.png", 32)
print "  Iron ore        :" ironore; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), ironore&
print ""
_FREEIMAGE ironore&
Else
end if

If coal >= 1 Then
coal& = _LOADIMAGE("coal.png", 32)
print "  Coal            :" coal; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), coal&
print ""
_FREEIMAGE coal&
Else
end if

If copperbar >= 1 Then
copperbar& = _LOADIMAGE("copperbar.png", 32)
print "  Copper bar      :" copperbar; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), copperbar&
print ""
_FREEIMAGE copperbar&
Else
end if

If ironbar >= 1 Then
ironbar& = _LOADIMAGE("ironbar.png", 32)
print "  Iron bar        :" ironbar; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), ironbar&
print ""
_FREEIMAGE ironbar&
Else
end if

If brick >= 1 Then
brick& = _LOADIMAGE("brick.png", 32)
print "  Brick            :" brick; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), brick&
print ""
_FREEIMAGE brick&
Else
end if

If paper >= 1 Then
paper& = _LOADIMAGE("paper.png", 32)
print "  Paper            :" paper; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), paper&
print ""
_FREEIMAGE paper&
Else
end if

If map >= 1 Then
map& = _LOADIMAGE("map.png", 32)
print "  Map of the island:" map; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), map&
print ""
_FREEIMAGE map&
Else
end if

If skin >= 1 Then
skin& = _LOADIMAGE("skin.png", 32)
print "  Hide            :" skin; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), skin&
print ""
_FREEIMAGE skin&
Else
end if

If leather >= 1 Then
leather& = _LOADIMAGE("leather.png", 32)
print "  Leather          :" leather; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), leather&
print ""
_FREEIMAGE leather&
Else
end if

If fat >= 1 Then
fat& = _LOADIMAGE("fat.png", 32)
print "  Fat              :" fat; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), fat&
print ""
_FREEIMAGE fat&
Else
end if

If feather >= 1 Then
feather& = _LOADIMAGE("feather.png", 32)
print "  Feather          :" feather; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
    _PUTIMAGE (X, Y), feather&
print ""
_FREEIMAGE feather&
Else
end if

If boneglue >= 1 Then
boneglue& = _LOADIMAGE("boneglue.png", 32)
print "  Bone glue        :" boneglue; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), boneglue&
print ""
_FREEIMAGE boneglue&
Else
end if

If thread >= 1 Then
thread& = _LOADIMAGE("thread.png", 32)
print "  Thread          :" thread; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), thread&
print ""
_FREEIMAGE thread&
Else
end if

If wax >= 1 Then
wax& = _LOADIMAGE("wax.png", 32)
print "  Wax              :" wax; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), wax&
print ""
_FREEIMAGE wax&
Else
end if

If flux >= 1 Then
flux& = _LOADIMAGE("flux.png", 32)
print "  Flux            :" flux; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), flux&
print ""
_FREEIMAGE flux&
Else
end if

If snakevenom >= 1 Then
snakevenom& = _LOADIMAGE("snakevenom.png", 32)
print "  Snake venom      :" snakevenom; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), snakevenom&
print ""
_FREEIMAGE snakevenom&
Else
end if

If pearl >= 1 Then
pearl& = _LOADIMAGE("pearl.png", 32)
print "  Pearl            :" pearl; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), pearl&
print ""
_FREEIMAGE pearl&
Else
end if

If tar >= 1 Then
tar& = _LOADIMAGE("tar.png", 32)
print "  Tar              :" tar; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), tar&
print ""
_FREEIMAGE tar&
Else
end if


'herbes -------------------------
locate 1, 37

print "Plant resources : "
print ""
If motherwort >= 1 Then
locate , 37
motherwort& = _LOADIMAGE("motherwort.png", 32)
print " Motherwort          :" motherwort; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), motherwort&
print ""
_FREEIMAGE motherwort&
Else
end if

If houseleek >= 1 Then
locate , 37
houseleek& = _LOADIMAGE("houseleek.png", 32)
print " Houseleek          :" houseleek; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), houseleek&
print ""
_FREEIMAGE houseleek&
Else
end if

If stjohnwort >= 1 Then
locate , 37
stjohnwort& = _LOADIMAGE("stjohnwort.png", 32)
print " St.John wort        :" stjohnwort; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), stjohnwort&
print ""
_FREEIMAGE stjohnwort&
Else
end if

If rosehip >= 1 Then
locate , 37
rosehip& = _LOADIMAGE("rosehip.png", 32)
print " Rosehip            :" rosehip; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), rosehip&
print ""
_FREEIMAGE rosehip&
Else
end if

If borage >= 1 Then
locate , 37
borage& = _LOADIMAGE("borage.png", 32)
print " Borage              :" borage; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), borage&
print ""
_FREEIMAGE borage&
Else
end if

If eucalyptus >= 1 Then
locate , 37
eucalyptus& = _LOADIMAGE("eucalyptus.png", 32)
print " Eucalyptus          :" eucalyptus; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), eucalyptus&
print ""
_FREEIMAGE eucalyptus&
Else
end if

If cinquefoil >= 1 Then
locate , 37
cinquefoil& = _LOADIMAGE("cinquefoil.png", 32)
print " Cinquefoil          :" cinquefoil; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), cinquefoil&
print ""
_FREEIMAGE cinquefoil&
Else
end if

If myrtle >= 1 Then
locate , 37
myrtle& = _LOADIMAGE("myrtle.png", 32)
print " Myrtle              :" myrtle; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), myrtle&
print ""
_FREEIMAGE myrtle&
Else
end if

If euphrasia >= 1 Then
locate , 37
euphrasia& = _LOADIMAGE("euphrasia.png", 32)
print " Euphrasia          :" euphrasia; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), euphrasia&
print ""
_FREEIMAGE euphrasia&
Else
end if

If groundivy >= 1 Then
locate , 37
groundivy& = _LOADIMAGE("groundivy.png", 32)
print " Ground ivy          :" groundivy; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), groundivy&
print ""
_FREEIMAGE groundivy&
Else
end if

If marshmallow >= 1 Then
locate , 37
marshmallow& = _LOADIMAGE("marshmallow.png", 32)
print " Marshmallow        :" marshmallow; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), marshmallow&
print ""
_FREEIMAGE marshmallow&
Else
end if

If sarsaparilla >= 1 Then
locate , 37
sarsaparilla& = _LOADIMAGE("sarsaparilla.png", 32)
print " Sarsaparilla        :" sarsaparilla; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), sarsaparilla&
print ""
_FREEIMAGE sarsaparilla&
Else
end if

If walnut >= 1 Then
locate , 37
walnut& = _LOADIMAGE("walnut.png", 32)
print " Walnut              :" walnut; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), walnut&
print ""
_FREEIMAGE walnut&
Else
end if
'armes and equipement ---------------------

locate 1, 71
print "Equipment : "
print ""
If bonespear.equipmentcount >= 1 Then
locate , 71
bonespearcount& = _LOADIMAGE("bonespear.png", 32)
print " Bone spear        :" bonespear.equipmentcount; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), bonespearcount&
print ""
_FREEIMAGE bonespearcount&
Else
end if

If flintspear.equipmentcount >= 1 Then
locate , 71
flintspearcount& = _LOADIMAGE("flintspear.png", 32)
print " Flint spear      :" flintspear.equipmentcount; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), flintspearcount&
print ""
_FREEIMAGE flintspearcount&
Else
end if

If copperspear.equipmentcount >= 1 Then
locate , 71
copperspearcount& = _LOADIMAGE("copperspear.png", 32)
print " Copper spear      :" copperspear.equipmentcount; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), copperspearcount&
print ""
_FREEIMAGE copperspearcount&
Else
end if

If ironspear.equipmentcount >= 1 Then
locate , 71
ironspearcount& = _LOADIMAGE("ironspear.png", 32)
print " Iron spear        :" ironspear.equipmentcount; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), ironspearcount&
print ""
_FREEIMAGE ironspearcount&
Else
end if
'Hide
If skingloves.equipmentcount >= 1 Then
locate , 71
skingloves& = _LOADIMAGE("skingloves.png", 32)
print " Hide gloves      :" skingloves.equipmentcount; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), skingloves&
print ""
_FREEIMAGE skingloves&
Else
end if

If skinhelmet.equipmentcount >= 1 Then
locate , 71
skinhelmet& = _LOADIMAGE("skinhelmet.png", 32)
print " Hide helmet      :" skinhelmet.equipmentcount; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), skinhelmet&
print ""
_FREEIMAGE skinhelmet&
Else
end if

If skinshoes.equipmentcount >= 1 Then
locate , 71
skinshoes& = _LOADIMAGE("skinshoes.png", 32)
print " Hide shoes        :" skinshoes.equipmentcount; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), skinshoes&
print ""
_FREEIMAGE skinshoes&
Else
end if

If skinarmor.equipmentcount >= 1 Then
locate , 71
skinarmor& = _LOADIMAGE("skinarmor.png", 32)
print " Hide armor        :" skinarmor.equipmentcount; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), skinarmor&
print ""
_FREEIMAGE skinarmor&
Else
end if
'Leather
If leathergloves.equipmentcount >= 1 Then
locate , 71
leathergloves& = _LOADIMAGE("leathergloves.png", 32)
print " Leather gloves    :" leathergloves.equipmentcount; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), leathergloves&
print ""
_FREEIMAGE leathergloves&
Else
end if

If leatherhelmet.equipmentcount >= 1 Then
locate , 71
leatherhelmet& = _LOADIMAGE("leatherhelmet.png", 32)
print " Leather helmet    :" leatherhelmet.equipmentcount; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), leatherhelmet&
print ""
_FREEIMAGE leatherhelmet&
Else
end if

If leathershoes.equipmentcount >= 1 Then
locate , 71
leathershoes& = _LOADIMAGE("leathershoes.png", 32)
print " Leather shoes    :" leathershoes.equipmentcount; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), leathershoes&
print ""
_FREEIMAGE leathershoes&
Else
end if

If leatherarmor.equipmentcount >= 1 Then
locate , 71
leatherarmor& = _LOADIMAGE("leatherarmor.png", 32)
print " Leather armor    :" leatherarmor.equipmentcount; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), leatherarmor&
print ""
_FREEIMAGE leatherarmor&
Else
end if

'outils -----------------------------------
locate 1, 105
print "Tools : "
print ""

If stoneaxe.equipmentcount >= 1 Then
locate , 105
stoneaxecount& = _LOADIMAGE("stoneaxe.png", 32)
print " Stone axe        :" stoneaxe.equipmentcount; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), stoneaxecount&
print ""
_FREEIMAGE stoneaxecount&
Else
end if

If copperaxe.equipmentcount >= 1 Then
locate , 105
copperaxecount& = _LOADIMAGE("copperaxe.png", 32)
print " Copper axe      :" copperaxe.equipmentcount; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), copperaxecount&
print ""
_FREEIMAGE copperaxecount&
Else
end if

If ironaxe.equipmentcount >= 1 Then
locate , 105
ironaxecount& = _LOADIMAGE("ironaxe.png", 32)
print " Iron axe        :" ironaxe.equipmentcount; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), ironaxecount&
print ""
_FREEIMAGE ironaxecount&
Else
end if

If copperpickaxe >= 1 Then
locate , 105
copperpickaxe& = _LOADIMAGE("copperpickaxe.png", 32)
print " Copper pickaxe  :" copperpickaxe "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), copperpickaxe&
print ""
_FREEIMAGE copperpickaxe&
Else
end if

If ironpickaxe >= 1 Then
locate , 105
ironpickaxe& = _LOADIMAGE("ironpickaxe.png", 32)
print " Iron pickaxe    :" ironpickaxe "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), ironpickaxe&
print ""
_FREEIMAGE ironpickaxe&
Else
end if

If woodshovel >= 1 Then
locate , 105
woodshovel& = _LOADIMAGE("woodshovel.png", 32)
print " Wooden shovel    :" woodshovel "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), woodshovel&
print ""
_FREEIMAGE woodshovel&
Else
end if

If coppershovel >= 1 Then
locate , 105
coppershovel& = _LOADIMAGE("coppershovel.png", 32)
print " Copper shovel    :" coppershovel "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), coppershovel&
print ""
_FREEIMAGE coppershovel&
Else
end if

If ironshovel >= 1 Then
locate , 105
ironshovel& = _LOADIMAGE("ironshovel.png", 32)
print " Iron shovel      :" ironshovel "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), ironshovel&
print ""
_FREEIMAGE ironshovel&
Else
end if

If claybowl >= 1 Then
locate , 105
claybowl& = _LOADIMAGE("claybowl.png", 32)
print " Clay pot        :" claybowl; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), claybowl&
print ""
_FREEIMAGE claybowl&
Else
end if

If glassbottle >= 1 Then
locate , 105
glassbottle& = _LOADIMAGE("glassbottle.png", 32)
print " Glass bottle    :" glassbottle; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), glassbottle&
print ""
_FREEIMAGE glassbottle&
Else
end if

If mortarpestle >= 1 Then
locate , 105
stoneaxecount& = _LOADIMAGE("mortarpestle.png", 32)
print " Mortar&pestle    :" mortarpestle; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), stoneaxecount&
print ""
_FREEIMAGE stoneaxecount&
Else
end if

If rope >= 1 Then
locate , 105
rope& = _LOADIMAGE("rope.png", 32)
print " Rope            :" rope; ""; 'decalage je sais pas pourquoi
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), rope&
print ""
_FREEIMAGE rope&
Else
end if

If bucket >= 1 Then
locate , 105
bucket& = _LOADIMAGE("bucket.png", 32)
print " Bucket          :" bucket; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), bucket&
print ""
_FREEIMAGE bucket&
Else
end if

If drawingmats >= 1 Then
locate , 105
drawingmats& = _LOADIMAGE("drawingmats.png", 32)
print " Drawing materials:" drawingmats; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), drawingmats&
print ""
_FREEIMAGE drawingmats&
Else
end if

sleep
       
CASE 18 'la chasse animal
CLS
FOR s = 1 TO 8 STEP 2
PRINT s; enemy(s),,, s + 1; enemy(s + 1)
NEXT s
print ""
'''''''''''start Armor defense & Weapon attack check block''''''''''
'---- armor
If leathergloves.equipmentcount >= 1 THEN
defense = defense + 2
elseIf skingloves.equipmentcount >= 1 THEN
defense = defense + 1
else defense = defense
end if
If leathershoes.equipmentcount >= 1 THEN
defense = defense + 2
elseIf skinshoes.equipmentcount >= 1 THEN
defense = defense + 1
else defense = defense
end if
If leatherhelmet.equipmentcount >= 1 THEN
defense = defense + 2
elseIF skinhelmet.equipmentcount >= 1 THEN
defense = defense + 1
else defense = defense
end if
If leatherarmor.equipmentcount >= 1 THEN
defense = defense + 3
elseIF skinarmor.equipmentcount >= 1 THEN
defense = defense + 2
else defense = defense
end if
'---- weapons
If ironspear.equipmentcount >= 1 THEN
damage = damage + 8
ELSEIF copperspear.equipmentcount >= 1 THEN
damage = damage + 6
ELSEIF flintspear.equipmentcount >= 1 THEN
damage = damage + 4
elseIf bonespear.equipmentcount >= 1 THEN
damage = damage + 2
ELSE
damage = damage
end if
'''''''''''end Armor defense & Weapon attack check block''''''''''
Print "Your defense using the best armors possible :"; defense 'wtf
    print "Your damage using the best weapons possible : "; damage
print ""
defense = 0
damage = 2 'retour a zero
Input " Select the animal you would like to hunt : ";choixchasse
print ""
select case choixchasse

case 1 'chasser lapin
energy = energy - 15
hour = hour + 1

'''''''''''start Armor defense & Weapon attack check block''''''''''
'---- armor
If leathergloves.equipmentcount >= 1 THEN
defense = defense + 2
elseIf skingloves.equipmentcount >= 1 THEN
defense = defense + 1
else defense = defense
end if
If leathershoes.equipmentcount >= 1 THEN
defense = defense + 2
elseIf skinshoes.equipmentcount >= 1 THEN
defense = defense + 1
else defense = defense
end if
If leatherhelmet.equipmentcount >= 1 THEN
defense = defense + 2
elseIF skinhelmet.equipmentcount >= 1 THEN
defense = defense + 1
else defense = defense
end if
If leatherarmor.equipmentcount >= 1 THEN
defense = defense + 3
elseIF skinarmor.equipmentcount >= 1 THEN
defense = defense + 2
else defense = defense
end if
'---- weapons
If ironspear.equipmentcount >= 1 THEN
damage = damage + 8
ELSEIF copperspear.equipmentcount >= 1 THEN
damage = damage + 6
ELSEIF flintspear.equipmentcount >= 1 THEN
damage = damage + 4
elseIf bonespear.equipmentcount >= 1 THEN
damage = damage + 2
ELSE
damage = damage
end if
'''''''''''end Armor defense & Weapon attack check block''''''''''
huntrabbit = Rnd
Select Case huntrabbit

Case IS < 0.50

Print "You haven't found any rabbit to hunt"
print "Energy left : " energy


Case IS >= 0.50 'son debut de combat?
CLS
do UNTIL (health <= 0) OR (rabbithealth <= 0)
rabbit& = _LOADIMAGE("rabbit.png", 32)
            _PUTIMAGE (230, 1), rabbit&
_FREEIMAGE rabbit&

print ""
locate 2,2
print  rabbitname
locate 3,3
print "Damage  (Paw)      : "  rabbitdamage
locate 4,4
print "Defense (Fur)      : "  rabbitdefense
locate 5,5
print "Health points      : "  rabbithealth
locate 6,6
print ""
locate 7,7
print "You                  " 
locate 8,8
print "Your damage        : "  damage
locate 9,9
print "Your defense        : "  defense
locate 10,10
print "Your health points  : "  health
locate 11,1
_delay 0.5
print ""
locate 12,12
print ""

hit& = _SNDOPEN("hit.mp3")
_SNDPLAY hit&
locate 13,12
print "You attack the " rabbitname
damagetaken = damage - rabbitdefense
if damagetaken < 0 then
damagetaken = 0
end if
rabbithealth = rabbithealth - damagetaken


_delay 0.5
hit& = _SNDOPEN("hit.mp3")
_SNDPLAY hit&
locate 14,13
print "Enemy health  " rabbithealth
locate 15,14
print ""
locate 16,15
print ""
locate 17,16
criticalhit = RND
select case criticalhit
case 0 to 0.12
print "The " rabbitname " attacks you" " - CRITICAL HIT!"
damagetaken = rabbitdamage * 2 - defense
if damagetaken < 0 then
damagetaken = 0
end if
health = health - damagetaken
case 0.13 TO 1
print "The " rabbitname " attacks you"
damagetaken = rabbitdamage - defense
if damagetaken < 0 then
damagetaken = 0
end if
health = health - damagetaken
end select
_delay 0.5
locate 18,17
print "Your health        " health


combatturn = combatturn + 1

if combatturn => 15 then
combatturn = 0
_delay 0.2
print ""
locate 20,18
print "You flee the fight."
sleep
goto endcombatrabbit
else
end if


sleep
CLS
loop

Print "The fight is over"
rabbithealth = 6 'rendre la vie au lapin pour la prochaine fois
defense = 0 'retour a la valeur de depart
damage = 2 'retour a la valeur de depart
combatturn = 0' reset combat turn

'''''''Start Check remove durability'''''''''''
IF leathergloves.equipmentcount >= 1 THEN
leathergloves.equipmentdurability = leathergloves.equipmentdurability - 1
elseIf skingloves.equipmentcount >= 1 THEN
skingloves.equipmentdurability = skingloves.equipmentdurability - 1
else
end if
IF leathershoes.equipmentcount >= 1 THEN
leathershoes.equipmentdurability = leathershoes.equipmentdurability - 1
elseIf skinshoes.equipmentcount >= 1 THEN
skinshoes.equipmentdurability = skinshoes.equipmentdurability - 1
else
end if
IF leatherhelmet.equipmentcount >= 1 THEN
leatherhelmet.equipmentdurability = leatherhelmet.equipmentdurability - 1
elseIF skinhelmet.equipmentcount >= 1 THEN
skinhelmet.equipmentdurability = skinhelmet.equipmentdurability - 1
else
end if
IF leatherarmor.equipmentcount >= 1 THEN
leatherarmor.equipmentdurability = leatherarmor.equipmentdurability - 1
elseIF skinarmor.equipmentcount >= 1 THEN
skinarmor.equipmentdurability = skinarmor.equipmentdurability - 1
else
end if
If ironspear.equipmentcount >= 1 THEN
ironspear.equipmentdurability = ironspear.equipmentdurability - 1
ELSEIF copperspear.equipmentcount >= 1 THEN
copperspear.equipmentdurability = copperspear.equipmentdurability - 1
ELSEIF flintspear.equipmentcount >= 1 THEN
flintspear.equipmentdurability = flintspear.equipmentdurability - 1
elseIf bonespear.equipmentcount >= 1 THEN
bonespear.equipmentdurability = bonespear.equipmentdurability - 1
ELSE
end if
''''''''End Check remove durability'''''''''''
print ""
print ""

healthBar$ = ""

FOR b = 1 TO INT(health/MAX_VALUE*75)
COLOR Red
healthBar$ = healthBar$ + "Û" ' Add a block character
NEXT b
PRINT "  Health:        "; healthBar$
print " "health

color White
_delay 0.5
print ""
print "Loot obtained :"
loot = Rnd
Select Case loot

Case 0 To 0.20
bone = bone + 1
print "A bone"
print ""
print "Bones left : " bone

Case 0.21 To 0.40
skin = skin + 1
print "A hide"
print ""
print "Hides left : " skin

Case 0.41 To 0.60
    food = food + 20*rnd+7
Print "Some  rabbit meat"
print ""
print "Food left : " food

Case 0.61 To 0.80
bone = bone + 1
skin = skin + 1
print "You collect one bone and one rabbit hide"
print ""
print "Bones left : " bone
print "Hides left : " skin

Case 0.81 to 0.90
print "The rabbit corpse is intact, you collect 20 Food, 1 Bone and 1 Hide"
food = food + 20
bone = bone + 1
skin = skin + 1
print ""
print "Food left : " food
print "Bones left : " bone
print "Hides left : " skin


Case 0.91 To 0.99
Print "The rabbit is too damaged to provide anything useful"



end select
if energy <= 0 then
energy = 1
end if
END SELECT
endcombatrabbit:
sleep



case 2 'chasser crabe

energy = energy - 15
hour = hour + 1

'''''''''''start Armor defense & Weapon attack check block''''''''''
'---- armor
If leathergloves.equipmentcount >= 1 THEN
defense = defense + 2
elseIf skingloves.equipmentcount >= 1 THEN
defense = defense + 1
else defense = defense
end if
If leathershoes.equipmentcount >= 1 THEN
defense = defense + 2
elseIf skinshoes.equipmentcount >= 1 THEN
defense = defense + 1
else defense = defense
end if
If leatherhelmet.equipmentcount >= 1 THEN
defense = defense + 2
elseIF skinhelmet.equipmentcount >= 1 THEN
defense = defense + 1
else defense = defense
end if
If leatherarmor.equipmentcount >= 1 THEN
defense = defense + 3
elseIF skinarmor.equipmentcount >= 1 THEN
defense = defense + 2
else defense = defense
end if
'---- weapons
If ironspear.equipmentcount >= 1 THEN
damage = damage + 8
ELSEIF copperspear.equipmentcount >= 1 THEN
damage = damage + 6
ELSEIF flintspear.equipmentcount >= 1 THEN
damage = damage + 4
elseIf bonespear.equipmentcount >= 1 THEN
damage = damage + 2
ELSE
damage = damage
end if
'''''''''''end Armor defense & Weapon attack check block''''''''''
huntcrab = Rnd
Select Case huntcrab

Case IS < 0.50

Print "You haven't found any crab to hunt"
print "Energy left : " energy


Case IS >= 0.50 'son debut de combat?
CLS

do UNTIL (health <= 0) OR (crabhealth <= 0)
crab& = _LOADIMAGE("crab.png", 32)
            _PUTIMAGE (230, 1), crab&
_FREEIMAGE crab&

print ""
locate 2,2
print crabname
locate 3,3
print "Damage  (Pincers)    : "  crabdamage
locate 4,4
print "Defense (Chitin)      : "  crabdefense
locate 5,5
print "Health points        : "  crabhealth
locate 6,6
print ""
locate 7,7
print "You                  " 
locate 8,8
print "Your damage          : "  damage
locate 9,9
print "Your defense          : "  defense
locate 10,10
print "Your health points    : "  health
locate 11,11
_delay 0.5
print ""
locate 12,12
print ""

hit& = _SNDOPEN("hit.mp3")
_SNDPLAY hit&
locate 13,12
print "You attack the " crabname
damagetaken = damage - crabdefense
if damagetaken < 0 then
damagetaken = 0
end if
crabhealth = crabhealth - damagetaken



_delay 0.5
hit& = _SNDOPEN("hit.mp3")
_SNDPLAY hit&
locate 14,13
print "Enemy health  " crabhealth
locate 15,14
print ""
locate 16,15
print ""
locate 17,16
print "The " crabname " attacks you"
damagetaken = crabdamage - defense
if damagetaken < 0 THEN
damagetaken = 0
end if
health = health - damagetaken

_delay 0.5
locate 18,17
print "Your health        " health

combatturn = combatturn + 1
if combatturn => 15 then
combatturn = 0
print ""
locate 20,18
print "You flee the fight."
sleep
goto endcombatcrab
end if

sleep
CLS
loop

Print "The fight is over"
crabhealth = 6 'rendre la vie au crabe pour la prochaine fois
defense = 0 'retour a la valeur de depart
damage = 2 'retour a la valeur de depart
combatturn = 0' reset combat turn

'''''''Start Check remove durability'''''''''''
IF leathergloves.equipmentcount >= 1 THEN
leathergloves.equipmentdurability = leathergloves.equipmentdurability - 1
elseIf skingloves.equipmentcount >= 1 THEN
skingloves.equipmentdurability = skingloves.equipmentdurability - 1
else
end if
IF leathershoes.equipmentcount >= 1 THEN
leathershoes.equipmentdurability = leathershoes.equipmentdurability - 1
elseIf skinshoes.equipmentcount >= 1 THEN
skinshoes.equipmentdurability = skinshoes.equipmentdurability - 1
else
end if
IF leatherhelmet.equipmentcount >= 1 THEN
leatherhelmet.equipmentdurability = leatherhelmet.equipmentdurability - 1
elseIF skinhelmet.equipmentcount >= 1 THEN
skinhelmet.equipmentdurability = skinhelmet.equipmentdurability - 1
else
end if
IF leatherarmor.equipmentcount >= 1 THEN
leatherarmor.equipmentdurability = leatherarmor.equipmentdurability - 1
elseIF skinarmor.equipmentcount >= 1 THEN
skinarmor.equipmentdurability = skinarmor.equipmentdurability - 1
else
end if
If ironspear.equipmentcount >= 1 THEN
ironspear.equipmentdurability = ironspear.equipmentdurability - 1
ELSEIF copperspear.equipmentcount >= 1 THEN
copperspear.equipmentdurability = copperspear.equipmentdurability - 1
ELSEIF flintspear.equipmentcount >= 1 THEN
flintspear.equipmentdurability = flintspear.equipmentdurability - 1
elseIf bonespear.equipmentcount >= 1 THEN
bonespear.equipmentdurability = bonespear.equipmentdurability - 1
ELSE
end if
''''''''End Check remove durability'''''''''''
print ""

healthBar$ = ""

FOR b = 1 TO INT(health/MAX_VALUE*75)
COLOR Red
healthBar$ = healthBar$ + "Û" ' Add a block character
NEXT b
PRINT "  Health:        "; healthBar$
print " "health

color White
_delay 0.5
print ""
print "Loot obtained :"
loot = Rnd
Select Case loot

Case 0 To 0.40
bone = bone + 1 '-----------------------------------------
print "A crab pincer"
print ""
print "Bones left : " bone

Case 0.41 to 0.49
pearl = pearl + 1
print "A crab pearl! - A super rare find!"
print ""
print "Pearls left : " pearl

Case 0.50 To 0.90
    food = food + 22*rnd+7
Print "Some crab meat"
print ""
print "Food left : " food


Case 0.91 To 0.99
Print "The crab is too damaged to provide anything useful"
end select
if energy <= 0 then
energy = 1
end if
END SELECT
endcombatcrab:
sleep
case 3 'chasser poule sauvage

energy = energy - 15
hour = hour + 1

'''''''''''start Armor defense & Weapon attack check block''''''''''
'---- armor
If leathergloves.equipmentcount >= 1 THEN
defense = defense + 2
elseIf skingloves.equipmentcount >= 1 THEN
defense = defense + 1
else defense = defense
end if
If leathershoes.equipmentcount >= 1 THEN
defense = defense + 2
elseIf skinshoes.equipmentcount >= 1 THEN
defense = defense + 1
else defense = defense
end if
If leatherhelmet.equipmentcount >= 1 THEN
defense = defense + 2
elseIF skinhelmet.equipmentcount >= 1 THEN
defense = defense + 1
else defense = defense
end if
If leatherarmor.equipmentcount >= 1 THEN
defense = defense + 3
elseIF skinarmor.equipmentcount >= 1 THEN
defense = defense + 2
else defense = defense
end if
'---- weapons
If ironspear.equipmentcount >= 1 THEN
damage = damage + 8
ELSEIF copperspear.equipmentcount >= 1 THEN
damage = damage + 6
ELSEIF flintspear.equipmentcount >= 1 THEN
damage = damage + 4
elseIf bonespear.equipmentcount >= 1 THEN
damage = damage + 2
ELSE
damage = damage
end if
'''''''''''end Armor defense & Weapon attack check block''''''''''
huntchicken = Rnd
Select Case huntchicken

Case IS < 0.50

Print "You haven't found any wild chicken to hunt"
print "Energy left : " energy


Case IS >= 0.50 'son debut de combat?
CLS

do UNTIL (health <= 0) OR (chickenhealth <= 0)
chicken& = _LOADIMAGE("chicken.png", 32)
            _PUTIMAGE (230, 1), chicken&
_FREEIMAGE chicken&

print ""
locate 2,2
print chickenname
locate 3,3
print "Damage  (Beak)        : "  chickendamage
locate 4,4
print "Defense (Feathers)    : "  chickendefense
locate 5,5
print "Health points        : "  chickenhealth
locate 6,6
print ""
locate 7,7
print "You                  " 
locate 8,8
print "Your damage          : "  damage
locate 9,9
print "Your defense          : "  defense
locate 10,10
print "Your health points    : "  health
locate 11,11
_delay 0.5
print ""
locate 12,12
print ""

hit& = _SNDOPEN("hit.mp3")
_SNDPLAY hit&
locate 13,12
print "You attack the " chickenname
damagetaken = damage - chickendefense
if damagetaken < 0 then
damagetaken = 0
end if
chickenhealth = chickenhealth - damagetaken



_delay 0.5
hit& = _SNDOPEN("hit.mp3")
_SNDPLAY hit&
locate 14,13
print "Enemy health  " chickenhealth
locate 15,14
print ""
locate 16,15
print ""
locate 17,16
print "The " chickenname " attacks you"
damagetaken = chickendamage - defense
if damagetaken < 0 THEN
damagetaken = 0
end if
health = health - damagetaken

_delay 0.5
locate 18,17
print "Your health        " health

combatturn = combatturn + 1
if combatturn => 15 then
combatturn = 0
print ""
locate 20,18
print "You flee the fight."
sleep
goto endcombatchicken
end if



sleep
CLS
loop

Print "The fight is over"
chickenhealth = 4 'rendre la vie au poulet pour la prochaine fois
defense = 0 'retour a la valeur de depart
damage = 2 'retour a la valeur de depart
combatturn = 0' reset combat turn

'''''''Start Check remove durability'''''''''''
IF leathergloves.equipmentcount >= 1 THEN
leathergloves.equipmentdurability = leathergloves.equipmentdurability - 1
elseIf skingloves.equipmentcount >= 1 THEN
skingloves.equipmentdurability = skingloves.equipmentdurability - 1
else
end if
IF leathershoes.equipmentcount >= 1 THEN
leathershoes.equipmentdurability = leathershoes.equipmentdurability - 1
elseIf skinshoes.equipmentcount >= 1 THEN
skinshoes.equipmentdurability = skinshoes.equipmentdurability - 1
else
end if
IF leatherhelmet.equipmentcount >= 1 THEN
leatherhelmet.equipmentdurability = leatherhelmet.equipmentdurability - 1
elseIF skinhelmet.equipmentcount >= 1 THEN
skinhelmet.equipmentdurability = skinhelmet.equipmentdurability - 1
else
end if
IF leatherarmor.equipmentcount >= 1 THEN
leatherarmor.equipmentdurability = leatherarmor.equipmentdurability - 1
elseIF skinarmor.equipmentcount >= 1 THEN
skinarmor.equipmentdurability = skinarmor.equipmentdurability - 1
else
end if
If ironspear.equipmentcount >= 1 THEN
ironspear.equipmentdurability = ironspear.equipmentdurability - 1
ELSEIF copperspear.equipmentcount >= 1 THEN
copperspear.equipmentdurability = copperspear.equipmentdurability - 1
ELSEIF flintspear.equipmentcount >= 1 THEN
flintspear.equipmentdurability = flintspear.equipmentdurability - 1
elseIf bonespear.equipmentcount >= 1 THEN
bonespear.equipmentdurability = bonespear.equipmentdurability - 1
ELSE
end if
''''''''End Check remove durability'''''''''''
print ""
print ""

healthBar$ = ""

FOR b = 1 TO INT(health/MAX_VALUE*75)
COLOR Red
healthBar$ = healthBar$ + "Û" ' Add a block character
NEXT b
PRINT "  Health:        "; healthBar$
print " "health

color White
_delay 0.5
print ""
print "Loot obtained :"
loot = Rnd
Select Case loot

Case 0 To 0.20
bone = bone + 1
print "A bone"
print ""
print "Bones left : " bone

Case 0.21 To 0.40
feather = feather + 1
print "A feather"
print ""
print "Feathers left : " feather

Case 0.41 To 0.60
    food = food + 15*rnd+7
Print "Some chicken meat"
print ""
print "Food left : " food

Case 0.61 To 0.80
bone = bone + 1
feather = feather + 1
print "You collect a bone and a feather"
print ""
print "Bones left    : " bone
print "Feathers left : " feather

Case 0.81 to 0.90
print "The wild chicken corpse is intact, you collect 20 Food, 1 bone and 1 feather"
food = food + 20
bone = bone + 1
feather = feather + 1
print ""
print "Food left    : " food
print "Bones left    : " bone
print "Feathers left : " feather


Case 0.91 To 0.99
Print "The wild chicken is too damage to provide anything useful"



end select
if energy <= 0 then
energy = 1
end if
END SELECT
endcombatchicken:
sleep
case 4 'chasser renard

energy = energy - 15
hour = hour + 1

'''''''''''start Armor defense & Weapon attack check block''''''''''
'---- armor
If leathergloves.equipmentcount >= 1 THEN
defense = defense + 2
elseIf skingloves.equipmentcount >= 1 THEN
defense = defense + 1
else defense = defense
end if
If leathershoes.equipmentcount >= 1 THEN
defense = defense + 2
elseIf skinshoes.equipmentcount >= 1 THEN
defense = defense + 1
else defense = defense
end if
If leatherhelmet.equipmentcount >= 1 THEN
defense = defense + 2
elseIF skinhelmet.equipmentcount >= 1 THEN
defense = defense + 1
else defense = defense
end if
If leatherarmor.equipmentcount >= 1 THEN
defense = defense + 3
elseIF skinarmor.equipmentcount >= 1 THEN
defense = defense + 2
else defense = defense
end if
'---- weapons
If ironspear.equipmentcount >= 1 THEN
damage = damage + 8
ELSEIF copperspear.equipmentcount >= 1 THEN
damage = damage + 6
ELSEIF flintspear.equipmentcount >= 1 THEN
damage = damage + 4
elseIf bonespear.equipmentcount >= 1 THEN
damage = damage + 2
ELSE
damage = damage
end if
'''''''''''end Armor defense & Weapon attack check block''''''''''
huntfox = Rnd
Select Case huntfox

Case IS < 0.50

Print "You haven't found any fox to hunt"
print "Energy left : " energy


Case IS >= 0.50 'son debut de combat?
CLS

do UNTIL (health <= 0) OR (foxhealth <= 0)
fox& = _LOADIMAGE("fox.png", 32)
_PUTIMAGE (230, 1), fox&
_FREEIMAGE fox&

print ""
locate 2,2
print foxname
locate 3,3
print "Damage  (Jaws)    : "  foxdamage
locate 4,4
print "Defense (Fur)      : "  foxdefense
locate 5,5
print "Health points      : "  foxhealth
locate 6,6
print ""
locate 7,7
print "You                  " 
locate 8,8
print "Your damage        : "  damage
locate 9,9
print "Your defense      : "  defense
locate 10,10
print "Your health points : "  health
locate 11,11
_delay 0.5
print ""
locate 12,12
print ""

hit& = _SNDOPEN("hit.mp3")
_SNDPLAY hit&
locate 13,12
print "You attack the " foxname
damagetaken = damage - foxdefense
if damagetaken < 0 then
damagetaken = 0
end if
foxhealth = foxhealth - damagetaken


_delay 0.5
hit& = _SNDOPEN("hit.mp3")
_SNDPLAY hit&
locate 14,13
print "Enemy health  " foxhealth
locate 15,14
print ""
locate 16,15
print ""
locate 17,16
criticalhit = RND
select case criticalhit
case 0 to 0.12
print "The " foxname " attacks you" " - CRITICAL HIT!"
damagetaken = foxdamage * 2 - defense
if damagetaken < 0 then
damagetaken = 0
end if
health = health - damagetaken
case 0.13 TO 1
print "The " foxname " attacks you"
damagetaken = foxdamage - defense
if damagetaken < 0 then
damagetaken = 0
end if
health = health - damagetaken
end select
_delay 0.5
locate 18,17
print "Your health        " health

combatturn = combatturn + 1
if combatturn => 15 then
combatturn = 0
print ""
locate 20,18
print "You flee the fight."
sleep
goto endcombatfox
end if

sleep
CLS
loop

Print "The fight is over"
foxhealth = 12 'rendre la vie au renard pour la prochaine fois
defense = 0 'retour a la valeur de depart
damage = 2 'retour a la valeur de depart
combatturn = 0' reset combat turn
'''''''Start Check remove durability'''''''''''
IF leathergloves.equipmentcount >= 1 THEN
leathergloves.equipmentdurability = leathergloves.equipmentdurability - 1
elseIf skingloves.equipmentcount >= 1 THEN
skingloves.equipmentdurability = skingloves.equipmentdurability - 1
else
end if
IF leathershoes.equipmentcount >= 1 THEN
leathershoes.equipmentdurability = leathershoes.equipmentdurability - 1
elseIf skinshoes.equipmentcount >= 1 THEN
skinshoes.equipmentdurability = skinshoes.equipmentdurability - 1
else
end if
IF leatherhelmet.equipmentcount >= 1 THEN
leatherhelmet.equipmentdurability = leatherhelmet.equipmentdurability - 1
elseIF skinhelmet.equipmentcount >= 1 THEN
skinhelmet.equipmentdurability = skinhelmet.equipmentdurability - 1
else
end if
IF leatherarmor.equipmentcount >= 1 THEN
leatherarmor.equipmentdurability = leatherarmor.equipmentdurability - 1
elseIF skinarmor.equipmentcount >= 1 THEN
skinarmor.equipmentdurability = skinarmor.equipmentdurability - 1
else
end if
If ironspear.equipmentcount >= 1 THEN
ironspear.equipmentdurability = ironspear.equipmentdurability - 1
ELSEIF copperspear.equipmentcount >= 1 THEN
copperspear.equipmentdurability = copperspear.equipmentdurability - 1
ELSEIF flintspear.equipmentcount >= 1 THEN
flintspear.equipmentdurability = flintspear.equipmentdurability - 1
elseIf bonespear.equipmentcount >= 1 THEN
bonespear.equipmentdurability = bonespear.equipmentdurability - 1
ELSE
end if
''''''''End Check remove durability'''''''''''

print ""
print ""

healthBar$ = ""

FOR b = 1 TO INT(health/MAX_VALUE*75)
COLOR Red
healthBar$ = healthBar$ + "Û" ' Add a block character
NEXT b
PRINT "  Health:        "; healthBar$
print " "health

color White
_delay 0.5
print ""
print "Loot obtained :"
loot = Rnd
Select Case loot

Case 0 To 0.20
bone = bone + 2
print "2 Bones"
print ""
print "Bones left : " bone

Case 0.21 To 0.40
skin = skin + 2
print "2 Hides"
print ""
print "Hides left : " skin

Case 0.41 To 0.57
    food = food + 22*rnd+7
Print "Some fox meat"
print ""
print "Food left : " food

Case 0.58 To 0.78
bone = bone + 2
skin = skin + 2
print "You collect two bones and two fox hides"
print ""
print "Bones left : " bone
print "Hides left : " skin

Case 0.79 to 0.90
print "The fox corpse is intact, you collect 22 Food, 2 Bones, 2 Hides and 2 Fat"
food = food + 22
bone = bone + 2
skin = skin + 2
fat = fat + 3
print ""
print "Food left  : " food
print "Bones left : " bone
print "Hides left : " skin
print "Fat left  : " fat


Case 0.91 To 0.99
Print "The fox is too damaged to provide anything useful"

end select
if energy <= 0 then
energy = 1
end if
END SELECT
endcombatfox:
sleep
case 5 'vautour
energy = energy - 15
hour = hour + 1

'''''''''''start Armor defense & Weapon attack check block''''''''''
'---- armor
If leathergloves.equipmentcount >= 1 THEN
defense = defense + 2
elseIf skingloves.equipmentcount >= 1 THEN
defense = defense + 1
else defense = defense
end if
If leathershoes.equipmentcount >= 1 THEN
defense = defense + 2
elseIf skinshoes.equipmentcount >= 1 THEN
defense = defense + 1
else defense = defense
end if
If leatherhelmet.equipmentcount >= 1 THEN
defense = defense + 2
elseIF skinhelmet.equipmentcount >= 1 THEN
defense = defense + 1
else defense = defense
end if
If leatherarmor.equipmentcount >= 1 THEN
defense = defense + 3
elseIF skinarmor.equipmentcount >= 1 THEN
defense = defense + 2
else defense = defense
end if
'---- weapons
If ironspear.equipmentcount >= 1 THEN
damage = damage + 8
ELSEIF copperspear.equipmentcount >= 1 THEN
damage = damage + 6
ELSEIF flintspear.equipmentcount >= 1 THEN
damage = damage + 4
elseIf bonespear.equipmentcount >= 1 THEN
damage = damage + 2
ELSE
damage = damage
end if
'''''''''''end Armor defense & Weapon attack check block''''''''''
huntvulture = Rnd
Select Case huntvulture

Case IS < 0.50

Print "You haven't found any vulture to hunt."
print "Energy left : " energy


Case IS >= 0.50 'son debut de combat?
CLS

do UNTIL (health <= 0) OR (vulturehealth <= 0)
vulture& = _LOADIMAGE("vulture.png", 32)
_PUTIMAGE (230, 1), vulture&
_FREEIMAGE vulture&
print ""
locate 2,1
print vulturename
locate 3,2
print "Damage  (Beak)      : "  vulturedamage
locate 4,3
print "Defense (Feathers)  : "  vulturedefense
locate 5,4
print "Health points      : "  vulturehealth
locate 6,5
print ""
locate 7,6
print "You                  " 
locate 8,7
print "Your damage        : "  damage
locate 9,8
print "Your defense        : "  defense
locate 10,9
print "Your health points  : "  health
locate 11,10
_delay 0.5
print ""
locate 12,11
print ""

hit& = _SNDOPEN("hit.mp3")
_SNDPLAY hit&
locate 13,12
print "You attack the " vulturename
damagetaken = damage - vulturedefense
if damagetaken < 0 then
damagetaken = 0
end if
vulturehealth = vulturehealth - damagetaken


_delay 0.5
hit& = _SNDOPEN("hit.mp3")
_SNDPLAY hit&
locate 14,13
print "Enemy health  " vulturehealth
locate 15,14
print ""
locate 16,15
print ""
locate 17,16
criticalhit = RND
select case criticalhit
case 0 to 0.12
print "The " vulturename " attacks you" " - CRITICAL HIT!"
damagetaken = vulturedamage * 2 - defense
if damagetaken < 0 then
damagetaken = 0
end if
health = health - damagetaken

case 0.13 TO 1
print "The " vulturename " attacks you"
damagetaken = vulturedamage - defense
if damagetaken < 0 then
damagetaken = 0
end if
health = health - damagetaken
end select
_delay 0.5
locate 18,17
print "Your health        " health

combatturn = combatturn + 1
if combatturn => 15 then
combatturn = 0
print ""
locate 20,18
print "You flee the fight."
sleep
goto endcombatvulture
end if
sleep
CLS
loop

Print "The fight is over"
vulturehealth = 9 'rendre la vie au vautour pour la prochaine fois
defense = 0 'retour a la valeur de depart
damage = 2 'retour a la valeur de depart
combatturn = 0' reset combat turn

'''''''Start Check remove durability'''''''''''
IF leathergloves.equipmentcount >= 1 THEN
leathergloves.equipmentdurability = leathergloves.equipmentdurability - 1
elseIf skingloves.equipmentcount >= 1 THEN
skingloves.equipmentdurability = skingloves.equipmentdurability - 1
else
end if
IF leathershoes.equipmentcount >= 1 THEN
leathershoes.equipmentdurability = leathershoes.equipmentdurability - 1
elseIf skinshoes.equipmentcount >= 1 THEN
skinshoes.equipmentdurability = skinshoes.equipmentdurability - 1
else
end if
IF leatherhelmet.equipmentcount >= 1 THEN
leatherhelmet.equipmentdurability = leatherhelmet.equipmentdurability - 1
elseIF skinhelmet.equipmentcount >= 1 THEN
skinhelmet.equipmentdurability = skinhelmet.equipmentdurability - 1
else
end if
IF leatherarmor.equipmentcount >= 1 THEN
leatherarmor.equipmentdurability = leatherarmor.equipmentdurability - 1
elseIF skinarmor.equipmentcount >= 1 THEN
skinarmor.equipmentdurability = skinarmor.equipmentdurability - 1
else
end if
If ironspear.equipmentcount >= 1 THEN
ironspear.equipmentdurability = ironspear.equipmentdurability - 1
ELSEIF copperspear.equipmentcount >= 1 THEN
copperspear.equipmentdurability = copperspear.equipmentdurability - 1
ELSEIF flintspear.equipmentcount >= 1 THEN
flintspear.equipmentdurability = flintspear.equipmentdurability - 1
elseIf bonespear.equipmentcount >= 1 THEN
bonespear.equipmentdurability = bonespear.equipmentdurability - 1
ELSE
end if
''''''''End Check remove durability'''''''''''
print ""
print ""

healthBar$ = ""

FOR b = 1 TO INT(health/MAX_VALUE*75)
COLOR Red
healthBar$ = healthBar$ + "Û" ' Add a block character
NEXT b
PRINT "  Health:        "; healthBar$
print " "health


color White
_delay 0.5
print ""
print "Loot obtained :"
loot = Rnd
Select Case loot

Case 0 To 0.20
bone = bone + 1
print "A bone"
print ""
print "Bones left : " bone

Case 0.21 To 0.30
feather = feather + 1
print "A feather"
print ""
print "Feathers left : " feather

Case 0.31 To 0.40
feather = feather + 2
print "Two feathers"
print ""
print "Feathers left : " feather

Case 0.41 To 0.60
    food = food + 21*rnd+7
fat = fat + 1
Print "Some vulture meat and one fat"
print ""
print "Food left : " food
print "Fat left  : " fat

Case 0.61 To 0.80
bone = bone + 1
feather = feather + 1
print "You collect a bone and a feather"
print ""
print "Bones left    : " bone
print "Feathers left : " feather

Case 0.81 to 0.90
print "The vulture corpse is intact, you collect 20 Food, 1 Bone, 3 Fat and 1 Feather"
food = food + 20
bone = bone + 1
feather = feather + 1
fat = fat + 3
print ""
print "Food left    : " food
print "Bones left    : " bone
print "Feathers left : " feather
print "Fat left      : " fat


Case 0.91 To 0.99
Print "The vulture is too damaged to provide anything useful."

end select
if energy <= 0 then
energy = 1
end if
END SELECT
endcombatvulture:
sleep
case 6 ' serpent
energy = energy - 15
hour = hour + 1

'''''''''''start Armor defense & Weapon attack check block''''''''''
'---- armor
If leathergloves.equipmentcount >= 1 THEN
defense = defense + 2
elseIf skingloves.equipmentcount >= 1 THEN
defense = defense + 1
else defense = defense
end if
If leathershoes.equipmentcount >= 1 THEN
defense = defense + 2
elseIf skinshoes.equipmentcount >= 1 THEN
defense = defense + 1
else defense = defense
end if
If leatherhelmet.equipmentcount >= 1 THEN
defense = defense + 2
elseIF skinhelmet.equipmentcount >= 1 THEN
defense = defense + 1
else defense = defense
end if
If leatherarmor.equipmentcount >= 1 THEN
defense = defense + 3
elseIF skinarmor.equipmentcount >= 1 THEN
defense = defense + 2
else defense = defense
end if
'---- weapons
If ironspear.equipmentcount >= 1 THEN
damage = damage + 8
ELSEIF copperspear.equipmentcount >= 1 THEN
damage = damage + 6
ELSEIF flintspear.equipmentcount >= 1 THEN
damage = damage + 4
elseIf bonespear.equipmentcount >= 1 THEN
damage = damage + 2
ELSE
damage = damage
end if
'''''''''''end Armor defense & Weapon attack check block''''''''''
huntsnake = Rnd
Select Case huntsnake

Case IS < 0.50

Print "You haven't found any snake to hunt"
print "Energy left : " energy


Case IS >= 0.50 'son debut de combat?
CLS

do UNTIL (health <= 0) OR (snakehealth <= 0)
snake& = _LOADIMAGE("snake.png", 32)
_PUTIMAGE (230, 1), snake&
_FREEIMAGE snake&
print ""
locate 2,1
print snakename
locate 3,2
print "Damage  (Fangs)      : "  snakedamage
locate 4,3
print "Defense (Hide)      : "  snakedefense
locate 5,4
print "Health points        : "  snakehealth
locate 6,5
print ""
locate 7,6
print "You                  " 
locate 8,7
print "Your damage          : "  damage
locate 9,8
print "Your defense        : "  defense
locate 10,9
print "Your health points  : "  health
locate 11,10
_delay 0.5
print ""
locate 12,11
print ""

hit& = _SNDOPEN("hit.mp3")
_SNDPLAY hit&
locate 13,12
print "You attack the " snakename
damagetaken = damage - snakedefense
if damagetaken < 0 then
damagetaken = 0
end if
snakehealth = snakehealth - damagetaken


_delay 0.5
hit& = _SNDOPEN("hit.mp3")
_SNDPLAY hit&
locate 14,13
print "Enemy health  " snakehealth
locate 15,14
print ""
locate 16,15
print ""
locate 17,16
criticalhit = RND
select case criticalhit
case 0 to 0.08
poison& = _SNDOPEN("poison.mp3")
_SNDPLAY poison&
print "The " snakename " attacks you" " - CRITICAL HIT! - You are poisoned!"
_delay 1
lightpoison = 1
damagetaken = snakedamage * 2 - defense
if damagetaken < 0 then
damagetaken = 0
end if
health = health - damagetaken

case 0.13 TO 1
print "The " snakename " attacks you"
damagetaken = snakedamage - defense
if damagetaken < 0 then
damagetaken = 0
end if
health = health - damagetaken
end select
_delay 0.5
locate 18,17
print "Your health        " health

combatturn = combatturn + 1
if combatturn => 15 then
combatturn = 0
print ""
locate 20,18
print "You flee the fight."
sleep
goto endcombatsnake
end if

sleep
CLS
loop

Print "The fight is over"
snakehealth = 15 'rendre la vie au serpent pour la prochaine fois
defense = 0 'retour a la valeur de depart
damage = 2 'retour a la valeur de depart
combatturn = 0' reset combat turn
'''''''Start Check remove durability'''''''''''
IF leathergloves.equipmentcount >= 1 THEN
leathergloves.equipmentdurability = leathergloves.equipmentdurability - 1
elseIf skingloves.equipmentcount >= 1 THEN
skingloves.equipmentdurability = skingloves.equipmentdurability - 1
else
end if
IF leathershoes.equipmentcount >= 1 THEN
leathershoes.equipmentdurability = leathershoes.equipmentdurability - 1
elseIf skinshoes.equipmentcount >= 1 THEN
skinshoes.equipmentdurability = skinshoes.equipmentdurability - 1
else
end if
IF leatherhelmet.equipmentcount >= 1 THEN
leatherhelmet.equipmentdurability = leatherhelmet.equipmentdurability - 1
elseIF skinhelmet.equipmentcount >= 1 THEN
skinhelmet.equipmentdurability = skinhelmet.equipmentdurability - 1
else
end if
IF leatherarmor.equipmentcount >= 1 THEN
leatherarmor.equipmentdurability = leatherarmor.equipmentdurability - 1
elseIF skinarmor.equipmentcount >= 1 THEN
skinarmor.equipmentdurability = skinarmor.equipmentdurability - 1
else
end if
If ironspear.equipmentcount >= 1 THEN
ironspear.equipmentdurability = ironspear.equipmentdurability - 1
ELSEIF copperspear.equipmentcount >= 1 THEN
copperspear.equipmentdurability = copperspear.equipmentdurability - 1
ELSEIF flintspear.equipmentcount >= 1 THEN
flintspear.equipmentdurability = flintspear.equipmentdurability - 1
elseIf bonespear.equipmentcount >= 1 THEN
bonespear.equipmentdurability = bonespear.equipmentdurability - 1
ELSE
end if
''''''''End Check remove durability'''''''''''
print ""
print ""

healthBar$ = ""

FOR b = 1 TO INT(health/MAX_VALUE*75)
COLOR Red
healthBar$ = healthBar$ + "Û" ' Add a block character
NEXT b
PRINT "  Health:        "; healthBar$
print " "health


color White
_delay 0.5
print ""
print "Loot obtained :"
loot = Rnd
Select Case loot

Case 0 To 0.20
bone = bone + 2
print "Two bones"
print ""
print "Bones left : " bone

Case 0.21 To 0.30
skin = skin + 2
print "Two snake hides"
print ""
print "Hides left : " skin

Case 0.31 To 0.40
skin = skin + 3
print "Three beautiful snake hides"
print ""
print "Hides left : " skin

Case 0.41 To 0.60
    food = food + 21*rnd+7
fat = fat + 1
Print "Some snake meat and 1 Fat"
print ""
print "Food left : " food
print "Fat left  : " fat

Case 0.61 To 0.70
bone = bone + 2
skin = skin + 2
print "You collect two bones and two snake hides"
print ""
print "Bones left : " bone
print "Hides left : " skin

Case 0.71 to 0.90
print "The snake corpse is intact, you collect 20 Food, 2 Bones, 3 Fat and 2 Hides"
food = food + 20
bone = bone + 2
skin = skin + 2
fat = fat + 3
if glassbottle >= 1 then
print "You manage to get snake venom and fill a glass bottle with it"
snakevenom = snakevenom + 1
glassbottle = glasbottle - 1
ELSE
print "If you had a glass bottle, you could have collected some venom from the snake"
end if
print ""
print "Food left  : " food
print "Bones left : " bone
print "Hides left : " skin
print "Fat left  : " fat
if snakevenom >= 1 then
print "Snake venom left : " snakevenom
end if


Case 0.91 To 0.99
Print "The snake is too damaged to provide anything useful."
end select
if energy <= 0 then
energy = 1
end if
END SELECT
endcombatsnake:
sleep
case 7 'varan

energy = energy - 15
hour = hour + 1

'''''''''''start Armor defense & Weapon attack check block''''''''''
'---- armor
If leathergloves.equipmentcount >= 1 THEN
defense = defense + 2
elseIf skingloves.equipmentcount >= 1 THEN
defense = defense + 1
else defense = defense
end if
If leathershoes.equipmentcount >= 1 THEN
defense = defense + 2
elseIf skinshoes.equipmentcount >= 1 THEN
defense = defense + 1
else defense = defense
end if
If leatherhelmet.equipmentcount >= 1 THEN
defense = defense + 2
elseIF skinhelmet.equipmentcount >= 1 THEN
defense = defense + 1
else defense = defense
end if
If leatherarmor.equipmentcount >= 1 THEN
defense = defense + 3
elseIF skinarmor.equipmentcount >= 1 THEN
defense = defense + 2
else defense = defense
end if
'---- weapons
If ironspear.equipmentcount >= 1 THEN
damage = damage + 8
ELSEIF copperspear.equipmentcount >= 1 THEN
damage = damage + 6
ELSEIF flintspear.equipmentcount >= 1 THEN
damage = damage + 4
elseIf bonespear.equipmentcount >= 1 THEN
damage = damage + 2
ELSE
damage = damage
end if
'''''''''''end Armor defense & Weapon attack check block''''''''''

huntlizard = Rnd
Select Case huntlizard

Case IS < 0.50

Print "You haven't found any lizard to hunt"
print "Energy left : " energy
sleep

Case IS >= 0.50 'son debut de combat?
CLS

do UNTIL (health <= 0) OR (lizardhealth <= 0)
lizard& = _LOADIMAGE("lizard.png", 32)
_PUTIMAGE (230, 1), lizard&
_FREEIMAGE lizard&
print ""
locate 2,2
print lizardname
locate 3,3
print "Damage (Claws)      : "  lizarddamage
locate 4,4
print "Defense (Thick hide): "  lizarddefense
locate 5,5
print "Enemy health        : "  lizardhealth
locate 6,6
print ""
locate 7,7
print "You                  " 
locate 8,8
print "Your damage        : "  damage
locate 9,9
print "Your defense        : "  defense
locate 10,10
print "Your health        : "  health
locate 11,11
_delay 0.5
print ""
locate 12,12
print ""

hit& = _SNDOPEN("hit.mp3")
_SNDPLAY hit&
locate 13,12
print "You attack the " lizardname
damagetaken = damage - lizarddefense
if damagetaken < 0 then
damagetaken = 0
end if
lizardhealth = lizardhealth - damagetaken


_delay 0.5
hit& = _SNDOPEN("hit.mp3")
_SNDPLAY hit&
locate 14,13
print "Enemy health  " lizardhealth
locate 15,14
print ""
locate 16,15
print ""
locate 17,16
print "The " lizardname " attacks you"
damagetaken = lizarddamage - defense
if damagetaken < 0 then
damagetaken = 0
end if
health = health - damagetaken
_delay 0.5
locate 18,17
print "Your health        " health

combatturn = combatturn + 1
if combatturn => 15 then
combatturn = 0
print ""
locate 20,18
print "You flee the fight."
sleep
goto endcombatlizard
end if

sleep
CLS
loop
lizardhealth = 16 ' pour la prochaine fois
defense = 0 'retour a la normale
damage = 2 'retour a la valeur de depart
combatturn = 0' reset combat turn

'''''''Start Check remove durability'''''''''''
IF leathergloves.equipmentcount >= 1 THEN
leathergloves.equipmentdurability = leathergloves.equipmentdurability - 1
elseIf skingloves.equipmentcount >= 1 THEN
skingloves.equipmentdurability = skingloves.equipmentdurability - 1
else
end if
IF leathershoes.equipmentcount >= 1 THEN
leathershoes.equipmentdurability = leathershoes.equipmentdurability - 1
elseIf skinshoes.equipmentcount >= 1 THEN
skinshoes.equipmentdurability = skinshoes.equipmentdurability - 1
else
end if
IF leatherhelmet.equipmentcount >= 1 THEN
leatherhelmet.equipmentdurability = leatherhelmet.equipmentdurability - 1
elseIF skinhelmet.equipmentcount >= 1 THEN
skinhelmet.equipmentdurability = skinhelmet.equipmentdurability - 1
else
end if
IF leatherarmor.equipmentcount >= 1 THEN
leatherarmor.equipmentdurability = leatherarmor.equipmentdurability - 1
elseIF skinarmor.equipmentcount >= 1 THEN
skinarmor.equipmentdurability = skinarmor.equipmentdurability - 1
else
end if
If ironspear.equipmentcount >= 1 THEN
ironspear.equipmentdurability = ironspear.equipmentdurability - 1
ELSEIF copperspear.equipmentcount >= 1 THEN
copperspear.equipmentdurability = copperspear.equipmentdurability - 1
ELSEIF flintspear.equipmentcount >= 1 THEN
flintspear.equipmentdurability = flintspear.equipmentdurability - 1
elseIf bonespear.equipmentcount >= 1 THEN
bonespear.equipmentdurability = bonespear.equipmentdurability - 1
ELSE
end if
''''''''End Check remove durability'''''''''''
Print "The fight is over"
print ""
print ""

healthBar$ = ""

FOR b = 1 TO INT(health/MAX_VALUE*75)
COLOR Red
healthBar$ = healthBar$ + "Û" ' Add a block character
NEXT b
PRINT "  Health:        "; healthBar$
print " "health

color White
_delay 1
print ""
print "Loot obtained :"
loot = Rnd
Select Case loot

Case 0 To 0.20
bone = bone + 1
print "A bone"
print ""
print "Bones left : " bone

Case 0.21 To 0.40
skin = skin + 1
print "A hide"
print ""
print "Hides left : " skin

Case 0.41 To 0.60
    skin = skin + 2
Print "Two lizard hides"
print ""
print "Hides left : " skin

Case 0.61 To 0.80
bone = bone + 1
skin = skin + 1
print "You collect 1 Bone and 1 lizard Hide"
print ""
print "Bones left : " bone
print "Hides left : " skin

Case 0.81 to 0.90
print "The lizard corpse is intact, you collect 2 Bones, 2 Hides and 1 Fat"
bone = bone + 2
skin = skin + 2
fat = fat + 1
print ""
print "Bones left : " bone
print "Hides left : " skin
print "Fat left  : " skin


Case 0.91 To 0.99
Print "The lizard corpse is too damaged to provide anything useful."
End select
endcombatlizard:
sleep
if energy <= 0 then
energy = 1
end if
end select
sleep
case 8 'ecureuil

energy = energy - 15
hour = hour + 1

'''''''''''start Armor defense & Weapon attack check block''''''''''
'---- armor
If leathergloves.equipmentcount >= 1 THEN
defense = defense + 2
elseIf skingloves.equipmentcount >= 1 THEN
defense = defense + 1
else defense = defense
end if
If leathershoes.equipmentcount >= 1 THEN
defense = defense + 2
elseIf skinshoes.equipmentcount >= 1 THEN
defense = defense + 1
else defense = defense
end if
If leatherhelmet.equipmentcount >= 1 THEN
defense = defense + 2
elseIF skinhelmet.equipmentcount >= 1 THEN
defense = defense + 1
else defense = defense
end if
If leatherarmor.equipmentcount >= 1 THEN
defense = defense + 3
elseIF skinarmor.equipmentcount >= 1 THEN
defense = defense + 2
else defense = defense
end if
'---- weapons
If ironspear.equipmentcount >= 1 THEN
damage = damage + 8
ELSEIF copperspear.equipmentcount >= 1 THEN
damage = damage + 6
ELSEIF flintspear.equipmentcount >= 1 THEN
damage = damage + 4
elseIf bonespear.equipmentcount >= 1 THEN
damage = damage + 2
ELSE
damage = damage
end if
'''''''''''end Armor defense & Weapon attack check block''''''''''
huntsquirrel = Rnd
Select Case huntsquirrel

Case IS < 0.50

Print "You haven't found any squirrel to hunt"
print "Energy left : " energy


Case IS >= 0.50 'son debut de combat?
CLS
do UNTIL (health <= 0) OR (squirrelhealth <= 0)
squirrel& = _LOADIMAGE("squirrel.png", 32)
            _PUTIMAGE (230, 1), squirrel&
_FREEIMAGE squirrel&

print ""
locate 2,2
print  squirrelname
locate 3,3
print "Damage  (Paw)      : "  squirreldamage
locate 4,4
print "Defense (Fur)      : "  squirreldefense
locate 5,5
print "Health points      : "  squirrelhealth
locate 6,6
print ""
locate 7,7
print "You                  " 
locate 8,8
print "Your damage        : "  damage
locate 9,9
print "Your defense      : "  defense
locate 10,10
print "Your health points : "  health
locate 11,1
_delay 0.5
print ""
locate 12,12
print ""

hit& = _SNDOPEN("hit.mp3")
_SNDPLAY hit&
locate 13,12
print "You attack the " squirrelname
damagetaken = damage - squirreldefense
if damagetaken < 0 then
damagetaken = 0
end if
squirrelhealth = squirrelhealth - damagetaken


_delay 0.5
hit& = _SNDOPEN("hit.mp3")
_SNDPLAY hit&
locate 14,13
print "Enemy health  " squirrelhealth
locate 15,14
print ""
locate 16,15
print ""
locate 17,16
criticalhit = RND
select case criticalhit
case 0 to 0.12
print "The " squirrelname " attacks you" " - CRITICAL HIT!"
damagetaken = squirreldamage * 2 - defense
if damagetaken < 0 then
damagetaken = 0
end if
health = health - damagetaken
case 0.13 TO 1
print "The " squirrelname " attacks you"
damagetaken = squirreldamage - defense
if damagetaken < 0 then
damagetaken = 0
end if
health = health - damagetaken
end select
_delay 0.5
locate 18,17
print "Your health        " health


combatturn = combatturn + 1

if combatturn => 15 then
combatturn = 0
_delay 0.2
print ""
locate 20,18
print "You flee the fight."
sleep
goto endcombatsquirrel
else
end if


sleep
CLS
loop

Print "The fight is over"
squirrelhealth = 6 'rendre la vie au lapin pour la prochaine fois
defense = 0 'retour a la valeur de depart
damage = 2 'retour a la valeur de depart
combatturn = 0' reset combat turn

'''''''Start Check remove durability'''''''''''
IF leathergloves.equipmentcount >= 1 THEN
leathergloves.equipmentdurability = leathergloves.equipmentdurability - 1
elseIf skingloves.equipmentcount >= 1 THEN
skingloves.equipmentdurability = skingloves.equipmentdurability - 1
else
end if
IF leathershoes.equipmentcount >= 1 THEN
leathershoes.equipmentdurability = leathershoes.equipmentdurability - 1
elseIf skinshoes.equipmentcount >= 1 THEN
skinshoes.equipmentdurability = skinshoes.equipmentdurability - 1
else
end if
IF leatherhelmet.equipmentcount >= 1 THEN
leatherhelmet.equipmentdurability = leatherhelmet.equipmentdurability - 1
elseIF skinhelmet.equipmentcount >= 1 THEN
skinhelmet.equipmentdurability = skinhelmet.equipmentdurability - 1
else
end if
IF leatherarmor.equipmentcount >= 1 THEN
leatherarmor.equipmentdurability = leatherarmor.equipmentdurability - 1
elseIF skinarmor.equipmentcount >= 1 THEN
skinarmor.equipmentdurability = skinarmor.equipmentdurability - 1
else
end if
If ironspear.equipmentcount >= 1 THEN
ironspear.equipmentdurability = ironspear.equipmentdurability - 1
ELSEIF copperspear.equipmentcount >= 1 THEN
copperspear.equipmentdurability = copperspear.equipmentdurability - 1
ELSEIF flintspear.equipmentcount >= 1 THEN
flintspear.equipmentdurability = flintspear.equipmentdurability - 1
elseIf bonespear.equipmentcount >= 1 THEN
bonespear.equipmentdurability = bonespear.equipmentdurability - 1
ELSE
end if
''''''''End Check remove durability'''''''''''
print ""
print ""

healthBar$ = ""

FOR b = 1 TO INT(health/MAX_VALUE*75)
COLOR Red
healthBar$ = healthBar$ + "Û" ' Add a block character
NEXT b
PRINT "  Health:        "; healthBar$
print " "health

color White
_delay 0.5
print ""
print "Loot obtained :"
loot = Rnd
Select Case loot

Case 0 To 0.20
bone = bone + 1
print "A bone"
print ""
print "Bones left : " bone

Case 0.21 To 0.40
skin = skin + 1
print "A hide"
print ""
print "Hides left : " skin

Case 0.41 To 0.60
    food = food + 20*rnd+7
Print "Some squirrel meat"
print ""
print "Food left : " food

Case 0.61 To 0.80
bone = bone + 1
skin = skin + 1
print "You collect 1 Bone and 1 squirrel Hide"
print ""
print "Bones left : " bone
print "Hides left : " skin

Case 0.81 to 0.90
print "The squirrel corpse is intact, you collect 20 Food, 1 Bone and 1 Hide"
food = food + 20
bone = bone + 1
skin = skin + 1
print ""
print "Food left  : " food
print "Bones left : " bone
print "Hides left : " skin


Case 0.91 To 0.99
Print "The squirrel is too damaged to provide anything useful."


end select
if energy <= 0 then
energy = 1
end if
END SELECT
endcombatsquirrel:
sleep
case 9
case 10
case 11
case 12
case 13
case 14
case 15
case 16
case 17
case 18
case 19
case 20

end select
       

CLS

CASE 19 'nested nested cases Big Grin ' exploration explorer

CLS
FOR s = 1 TO 9 STEP 3
PRINT s; mainlocation(s),, s + 1; mainlocation(s + 1),, s + 2; mainlocation(s + 2)
NEXT s
print ""
Input " Select the location to explore : ";choixlieuprincipal
print ""
print " If you have mapped the island, exploring takes less energy"
select case choixlieuprincipal

case 1 'prairies

FOR s = 1 TO 4 STEP 2
PRINT s; meadows(s),, s + 1; meadows(s + 1)
NEXT s
print ""
Input " Select the meadow you would like to explore : ";choixmeadow
print ""

select case choixmeadow

Case 1 'prairie savanne
savanna& = _LOADIMAGE("savanna.png", 32)
_PUTIMAGE (1325, 1), savanna&
_FREEIMAGE savanna&
energy = energy - 60
'sound
    print ""
print "You are heading for the savanna..."
print "Energy left : " energy
hour = hour + 3
thirst = thirst - 8
print "Thirst left    : " thirst
sleep

savanne = Rnd
Select Case savanne

Case IS < 0.40 ' 33% chance of this outcome
'son savanne
Print "After very long minutes, you find an animal carcass. You collect some bones. This place looks quite dangerous..."
bonescollected = 10*rnd+1
print "You collect "bonescollected "bones"
bone = bone + bonescollected
print "Bones left : " bone
sleep

Case 0.41 To 0.63 ' 34% chance of this outcome

'son lion

Print "While strolling through the savanna, you feel something approaching..."
lion& = _SNDOPEN("lion.mp3")
_SNDPLAY lion&
_delay 1
print "A lion attacks you by surprise !"
_delay 3
'son
print "Hurt and staggering, you manage to flee as the lion starts chasing a gazelle, seeming to have found a more interesting prey."
health = INT(health * 0.1)

print "Current health  : " health
sleep

Case Else

Print "Unfortunately, you do not find anything interesting in the savanna."
hunger = hunger - 8
thirst = thirst - 8
print ""
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy    : " energy
sleep

End select

Case 2 'prairie desertique
desertprairie& = _LOADIMAGE("desertprairie.png", 32)
_PUTIMAGE (1325, 1), desertprairie&
_FREEIMAGE desertprairie&
energy = energy - 60
'sound
    print ""
print "You head to a desert prairie"
print "Energy left : " energy
print "Current thirst    : " thirst
hour = hour + 3
thirst = thirst - 11
sleep

prairiedesertique = Rnd
Select Case prairiedesertique

Case IS < 0.33 ' 33% chance of this outcome
'son savanne
Print "After very long minutes under a blazing sun, you find an animal carcass. You collect some bones. What a sweltering heat!"
_delay 0.2
bonescollected = 10*rnd+1
print "You collect " bonescollected "bones"
bone = bone + bonescollected
thirst = thirst - 10
warmth = warmth + 15
if warmth >= 100 then
warmth = 100
end if
print "Bones left        : " bone
print "Current thirst    : " thirst
print "Current warmth    : " warmth
sleep

Case 0.33 To 0.66 ' 34% chance of this outcome

print "From the top of a rock rises a lizard, watching your every move...."
_delay 1
print "Suddenly, it starts attacking you!"
_delay 1
CLS
energy = energy - 5

'''''''''''start Armor defense & Weapon attack check block''''''''''
'---- armor
If leathergloves.equipmentcount >= 1 THEN
defense = defense + 2
elseIf skingloves.equipmentcount >= 1 THEN
defense = defense + 1
else defense = defense
end if
If leathershoes.equipmentcount >= 1 THEN
defense = defense + 2
elseIf skinshoes.equipmentcount >= 1 THEN
defense = defense + 1
else defense = defense
end if
If leatherhelmet.equipmentcount >= 1 THEN
defense = defense + 2
elseIF skinhelmet.equipmentcount >= 1 THEN
defense = defense + 1
else defense = defense
end if
If leatherarmor.equipmentcount >= 1 THEN
defense = defense + 3
elseIF skinarmor.equipmentcount >= 1 THEN
defense = defense + 2
else defense = defense
end if
'---- weapons
If ironspear.equipmentcount >= 1 THEN
damage = damage + 8
ELSEIF copperspear.equipmentcount >= 1 THEN
damage = damage + 6
ELSEIF flintspear.equipmentcount >= 1 THEN
damage = damage + 4
elseIf bonespear.equipmentcount >= 1 THEN
damage = damage + 2
ELSE
damage = damage
end if
'''''''''''end Armor defense & Weapon attack check block''''''''''

do UNTIL (health <= 0) OR (lizardhealth <= 0)
lizard& = _LOADIMAGE("lizard.png", 32)
_PUTIMAGE (230, 1), lizard&
_FREEIMAGE lizard&
print ""
locate 2,2
print lizardname
locate 3,3
print "Damage (Claws)      : "  lizarddamage
locate 4,4
print "Defense (Thick hide) : "  lizarddefense
locate 5,5
print "Enemy health        : "  lizardhealth
locate 6,6
print ""
locate 7,7
print "You                  " 
locate 8,8
print "Your damage          : "  damage
locate 9,9
print "Your defense        : "  defense
locate 10,10
print "Your health          : "  health
locate 11,11
_delay 0.5
print ""
locate 12,12
print ""

hit& = _SNDOPEN("hit.mp3")
_SNDPLAY hit&
locate 13,12
print "You attack the " lizardname
damagetaken = damage - lizarddefense
if damagetaken < 0 then
damagetaken = 0
end if
lizardhealth = lizardhealth - damagetaken


_delay 0.5
hit& = _SNDOPEN("hit.mp3")
_SNDPLAY hit&
locate 14,13
print "Enemy health  " lizardhealth
locate 15,14
print ""
locate 16,15
print ""
locate 17,16
print "The " lizardname " attacks you"
damagetaken = lizarddamage - defense
if damagetaken < 0 then
damagetaken = 0
end if
health = health - damagetaken
_delay 0.5
locate 18,17
print "Your health        " health
sleep
CLS
loop
lizardhealth = 16 ' pour la prochaine fois
defense = 0 'retour a la normale
damage = 2 'retour a la valeur de depart
combatturn = 0' reset combat turn

'''''''Start Check remove durability'''''''''''
IF leathergloves.equipmentcount >= 1 THEN
leathergloves.equipmentdurability = leathergloves.equipmentdurability - 1
elseIf skingloves.equipmentcount >= 1 THEN
skingloves.equipmentdurability = skingloves.equipmentdurability - 1
else
end if
IF leathershoes.equipmentcount >= 1 THEN
leathershoes.equipmentdurability = leathershoes.equipmentdurability - 1
elseIf skinshoes.equipmentcount >= 1 THEN
skinshoes.equipmentdurability = skinshoes.equipmentdurability - 1
else
end if
IF leatherhelmet.equipmentcount >= 1 THEN
leatherhelmet.equipmentdurability = leatherhelmet.equipmentdurability - 1
elseIF skinhelmet.equipmentcount >= 1 THEN
skinhelmet.equipmentdurability = skinhelmet.equipmentdurability - 1
else
end if
IF leatherarmor.equipmentcount >= 1 THEN
leatherarmor.equipmentdurability = leatherarmor.equipmentdurability - 1
elseIF skinarmor.equipmentcount >= 1 THEN
skinarmor.equipmentdurability = skinarmor.equipmentdurability - 1
else
end if
If ironspear.equipmentcount >= 1 THEN
ironspear.equipmentdurability = ironspear.equipmentdurability - 1
ELSEIF copperspear.equipmentcount >= 1 THEN
copperspear.equipmentdurability = copperspear.equipmentdurability - 1
ELSEIF flintspear.equipmentcount >= 1 THEN
flintspear.equipmentdurability = flintspear.equipmentdurability - 1
elseIf bonespear.equipmentcount >= 1 THEN
bonespear.equipmentdurability = bonespear.equipmentdurability - 1
ELSE
end if
''''''''End Check remove durability'''''''''''
Print "The fight is over"
print ""
print ""

healthBar$ = ""

FOR b = 1 TO INT(health/MAX_VALUE*75)
COLOR Red
healthBar$ = healthBar$ + "Û" ' Add a block character
NEXT b
PRINT "  Health:        "; healthBar$
print " "health

color White
_delay 1
print ""
print "Loot obtained :"
loot = Rnd
Select Case loot

Case 0 To 0.20
bone = bone + 1
print "A bone"
print ""
print "Bones left : " bone

Case 0.21 To 0.40
skin = skin + 1
print "A hide"
print ""
print "Hides left : " skin

Case 0.41 To 0.60
    skin = skin + 2
Print "Two lizard hides"
print ""
print "Hides left : " skin

Case 0.61 To 0.80
bone = bone + 1
skin = skin + 1
print "You collect a bone and a lizard hide"
print ""
print "Bones left : " bone
print "Hides left : " skin

Case 0.81 to 0.90
print "The lizard corpse is intact, you collect 2 Bones, 2 Hides and 1 Fat"
bone = bone + 2
skin = skin + 2
fat = fat + 1
print ""
print "Bones left : " bone
print "Hides left : " skin
print "Fat left  : " fat


Case 0.91 To 0.99
Print "The lizard corpse is too damaged to provide anything useful."
End select
sleep
if energy <= 0 then
energy = 1
end if


Case Else

Print "Unfortunately, you do not find anything interesting in this desert prairie."
hunger = hunger - 8
thirst = thirst - 8
print ""
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy    : " energy
End select
sleep

Case 3 'prairie fleurie
flowermeadow& = _LOADIMAGE("flowermeadow.png", 32)
_PUTIMAGE (1325, 1), flowermeadow&
_FREEIMAGE flowermeadow&
energy = energy - 65
'sound
    print ""
print "You head towards a lush flower meadow..."
print "Energy left      : " energy
print "Current thirst    : " thirst
hour = hour + 3
thirst = thirst - 5

prairiefleurie = Rnd
Select Case prairiefleurie
Case 0 To 0.10
Print "You find a bee hive that looks empty..."
_delay 1
Print "It sadly wasn't!"
_delay 0.3
print "The bees sting you and collect a bit of honey and wax before fleeing running."
food = food + 10*rnd
wax = wax + 1
health = health - 10
Print "Food left      : " food
print "Wax  left      : " wax
print "Current health : " health
sleep
Case 0.11 To 0.30
stjohnwort = stjohnwort + 1
borage = borage + 1
eucalyptus = eucalyptus + 1
myrtle = myrtle + 1
euphrasia = euphrasia + 1
marshmallow = marshmallow + 1
print "You picked up a few herbs..."
case 0.31 to 0.50
motherwort = motherwort + 1
houseleek = houseleek + 1
rosehip = rosehip + 1
cinquefoil = cinquefoil + 1
groundivy = groundivy + 1
sarsaparilla = sarsaparilla + 1
print "You picked up a few herbs..."
Case 0.51 TO 0.75
houseleek = houseleek + 1
borage = borage + 1
eucalyptus = eucalyptus + 1
myrtle = myrtle + 1
marshmallow = marshmallow + 1
walnut = walnut + 1
print "You picked up a few herbs..."
case 0.76 to 0.99
motherwort = motherwort + 1
stjohnwort = stjohnwort + 1
rosehip = rosehip + 1
cinquefoil = cinquefoil + 1
euphrasia = euphrasia + 1
groundivy = groundivy + 1
print "You picked up a few herbs randomly..."
end select

sleep

Case 4 'prairie humide
energy = energy - 65
wetmeadow& = _LOADIMAGE("wetmeadow.png", 32)
_PUTIMAGE (1325, 1), wetmeadow&
_FREEIMAGE wetmeadow&
print ""
print "You head towards some wetlands..."
print "Energy left : " energy
hour = hour + 3
thirst = thirst - 7
print "Thirst left    : " thirst
sleep

prairiehumide = Rnd
Select Case prairiehumide

Case IS < 0.33 '

Print "Those wetlands are full of deciduous trees. You collect some leaves."
leavescollected = 10*rnd+10
Print "You collected" leavescollected "leaves"
leaf = leaf + leavescollected
print "Leaves left : " leaf
sleep

Case 0.33 To 0.60 '

Print "You find a bee hive. It looks empty..."
_delay 1
print "You collect a bit of honey and some wax."
food = food + 10*rnd+3
wax = wax + 2
Print "Food left : " food
print "Wax left  : " wax
sleep

Case 0.61 To 0.80
Print "You find a rosehip bush. You collect as many as possible."
rosehip = rosehip + 7*rnd+3
print "Rosehips left : " rosehip
sleep

Case Else

Print "Unfortunately, you do not find anything interesting in those wetlands."
hunger = hunger - 8
thirst = thirst - 8
print ""
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy    : " energy
sleep

End select



Sleep
End Select

case 2 'collines

FOR s = 1 TO 5 STEP 2
PRINT s; hills(s),, s + 1; hills(s + 1)
NEXT s
print ""
Input " Select the hills you would like to explore : ";choixhills
print ""

select case choixhills

case 1 'vallee fertile
energy = energy - 70
thirst = thirst - 15
hunger = hunger - 15
fertilevalley& = _LOADIMAGE("fertilevalley.png", 32)
_PUTIMAGE (1325, 1), fertilevalley&
_FREEIMAGE fertilevalley&
print "You head towards the fertile valley..."
_delay 1
Print "This valley is full of different resources. You collect as many as possible to bring back to camp." 'collected bla bla
leaf = leaf + 5*rnd+3
wood = wood + 2*rnd+2
vine = vine + 2*RND+2
plant = plant + 2*RND+2
food = food +10*RND+5
print "Leafs left  : " leaf
print "Wood left  : " wood
print "Vines left  : " vine
print "Plants left : " plant
print "Food left  : " food
_delay 1
sleep

case 2 'riviere sinueuse
energy = energy - 75
hunger = hunger - 10
health = health - 2
warmth = warmth - 5
river& = _LOADIMAGE("river.png", 32)
_PUTIMAGE (1325, 1), river&
_FREEIMAGE river&
print "You head towards the meandering river..."
_delay 1
Print "Cette river is full of life. You take the opportunity to wash up, quench yourself and bring back some water"
hygiene = hygiene + 30*rnd+68
thirst = thirst + 25
water = water + 20*rnd+15
if hygiene >= 100 then
hygiene = 100
end if
If thirst >= 100 then
thirst = 100
end if
If water >= 100 then
water = 100
end if
print "Current hygiene : " hygiene
print "Current thirst  :  " thirst
print "Water left      : " water
print "Current warmth  : " warmth
_delay 1
sleep

case 3 'collines ondulees
energy = energy - 1
wavyhills& = _LOADIMAGE("wavyhills.png", 32)
_PUTIMAGE (1325, 1), wavyhills&
_FREEIMAGE wavyhills&
sleep

energy = energy - 70
thirst = thirst - 15
hunger = hunger - 15

print "You head towards wavy hills..."
_delay 1
Print "Those hills are full of different resources. You collect as many as possible to bring back to campThose hills are full of different resources. You collect as many as possible to bring back to camp." 'collected bla bla
leaf = leaf + 5*rnd+3
wood = wood + 2*rnd+2
vine = vine + 2*RND+2
plant = plant + 2*RND+2
food = food +10*RND+5
print "Leaves left : " leaf
print "Wood left  : " wood
print "Vines left  : " vine
print "Plants left : " plant
print "Food left  : " food
_delay 1
sleep

case 4 'collines rocheuses
energy = energy - 1
rockyhills& = _LOADIMAGE("rockyhills.png", 32)
_PUTIMAGE (1325, 1), rockyhills&
_FREEIMAGE rockyhills&
energy = energy - 70
hunger = hunger - 10
health = health - 2
warmth = warmth - 5
print "You head towards some rocky hills..."
_delay 1
Print "Those hills are full of different rocks. You collect as many as possible to bring back to camp."
rockcollected = 6+RND+RND+RND
flintcollected = 2
Print "You collected" rockcollected " rocks and " flintcollected " flint."
rock = rock + rockcollected
flint = flint + flintcollected
print "Rocks left : " rock
print "Flint left : " flint
_delay 1

sleep

case 5 'trou profond
If rope >= 1 then
energy = energy - 63
Print "You attach the rope to a nearby tree and start descending..."
_delay 0.6
trouprofond = Rnd
Select Case trouprofond
Case IS < 0.33 '

Print "You collect 10 Rocks."
rock = rock + 10

sleep

Case 0.33 To 0.60 '

Print "You collect 10 Flint."
flint = flint + 10

sleep

Case 0.61 To 0.80
Print "You collect 10 Clay."
clay = clay + 10
sleep

Case Else

Print "Unfortunately, you do not find anything interesting in this deep hole."
hunger = hunger - 8
thirst = thirst - 8
print ""
print "Current hunger  : " hunger
print "Current thirst  : " thirst
print "Current energy  : " energy
sleep

End select

ELSE
print "You will need a rope to descend and explore this deep hole."
end if
end select

case 3 'jungles

FOR s = 1 TO 7 STEP 2
PRINT s; jungles(s),, s + 1; jungles(s + 1)
NEXT s
print ""
Input " Select the jungle you would like to explore : ";choixjungles
print ""

select case choixjungles

case 1 'Foret tropicale humide
energy = energy - 1
jungle& = _LOADIMAGE("jungle.png", 32)
_PUTIMAGE (1325, 1), jungle&
_FREEIMAGE jungle&
sleep


case 2 ' Cascade dans la jungle
energy = energy - 75
hunger = hunger - 10
health = health - 2
warmth = warmth - 5
river& = _LOADIMAGE("river.png", 32)
_PUTIMAGE (1325, 1), river&
_FREEIMAGE river&
print "You head towards the jungle waterfall..."
_delay 1
Print "This waterfall is a sight for sore eyes. You use the opportunity to wash yourself, quench your thirst and bring back some water."
hygiene = hygiene + 30*rnd+68
thirst = thirst + 25
water = water + 20*rnd+15
if hygiene >= 100 then
hygiene = 100
end if
If thirst >= 100 then
thirst = 100
end if
If water >= 100 then
water = 100
end if
print "Current hygiene : " hygiene
print "Current thirst  : " thirst
print "Water left      : " water
print "Current warmth  : " warmth
_delay 1
sleep

case 3 ' Mangrove
energy = energy - 1

case 4 ' Jungle de bambou
energy = energy - 70
hunger = hunger - 5
thirst = thirst - 5
hygiene = hygiene - 5

print "You head towards the bamboo jungle..."
_delay 1
bamboo& = _SNDOPEN("bamboo.mp3")
_SNDPLAY bamboo&
Print "This bamboo jungle is hard to cross. You bend some trees to collect some wood."
wood = wood + 12+rnd+rnd+rnd+rnd
print "Wood left : " wood
_delay 1
sleep

case 5 ' Palmeraie
energy = energy - 60
palmeraiecheck = rnd
select case palmeraiecheck
case 0 to 0.33
Print "This palm grove is full of leafy palm trees. You collect some palm leaves."
leavescollected = 13*rnd+3
Print "You have collected " leavescollected " leaves"
leaf = leaf + leavescollected
print "Leaves left : " leaf
sleep
case 0.34 to 0.66
Print "This palm grove is full of leafy palm trees. You collect some coconuts."
foodcollected = 45*rnd+3
Print "You have collected" foodcollected " Food"
food = food + foodcollected
print "Food left : " food
sleep
case 0.67 to 0.99
Print "This palm grove is full of palm trees. You collect some palm leaves and some coconuts."
leavescollected = 6*rnd+3
foodcollected = 23*rnd+3
Print "You have collected" leavescollected " leaves"
leaf = leaf + leavescollected
Print "You have collected" foodcollected " food"
food = food + foodcollected
print "Food left  : " food
print "Leaves left : " leaf
sleep
end select

case 6 ' Saltwater marsh
energy = energy - 1

case 7 ' Freshwater marsh
energy = energy - 1

end select

case 4 'montagnes

FOR s = 1 TO 6 STEP 2
PRINT s; mountains(s),, s + 1; mountains(s + 1)
NEXT s
print ""
Input " Select the mountain you would like to explore: ";choixmountains
print ""

select case choixmountains


case 1 'Montagne tropicale
energy = energy - 1

case 2 ' Hauts platWaterx rocheux
energy = energy - 1
mountain& = _LOADIMAGE("mountain.png", 32)
_PUTIMAGE (1325, 1), mountain&
_FREEIMAGE mountain&
sleep

case 3 ' Foret de nuages
energy = energy - 1

case 4 ' Source d'Water chaude
energy = energy - 1

case 5 ' Cascade de montagne
energy = energy - 1

case 6 ' Lac de montagne
energy = energy - 1

end select

case 5 'plages


FOR s = 1 TO 7 STEP 2
PRINT s; beaches(s),, s + 1; beaches(s + 1)
NEXT s
print ""
Input " Select the beach you would like to explore : ";choixbeaches
print ""

select case choixbeaches

case 1 'Plage de Sand blanc
energy = energy - 50
beach& = _LOADIMAGE("beach.png", 32)
_PUTIMAGE (1325, 1), beach&
_FREEIMAGE beach&

print ""
print "You head towards a white sand beach. The Sand is soft to the touch..."
print "Energy left : " energy
hour = hour + 1
thirst = thirst - 3
_delay .2
print ""
print " 1 - Sand  | 2 - Seashells | 3 - Coconuts "
input " What would you like to pick up?  ";Sandblanc
print ""
select case Sandblanc
case 1
Print "You pick up some Sand..."
sand = sand + 5*rnd+3
_delay .5
print  "Sand left : " sand
sleep

Case 2
Print "You pick up Seashells..."
kokiyas = kokiyas + 6*rnd+4
_delay .5
print  "Seashells left : " kokiyas
sleep

Case 3
Print "You pick up coconuts."
food = food + 32*rnd+5
_delay .5
print  "Food left : " food
sleep
End select
case 2 ' Recif de corail
energy = energy - 1
case 3 ' Laga turquoise
energy = energy - 1
case 4 ' Caverne sous-marine
energy = energy - 1
case 5 ' Petite ile voisine
energy = energy - 60
splash& = _SNDOPEN("splash.mp3")
_SNDPLAY splash&
    print ""
print "You swim to a small island not far from your camp..."
print "Energy left : " energy
hour = hour + 2
thirst = thirst - 5
sleep
neighborislandResult = Rnd
Select Case neighborislandResult

Case IS < 0.33 ' 33% chance of this outcome
Print "You found some refreshing coconuts that you eat on the spot."
hunger = hunger + 25
thirst = thirst + 30
energy = energy + Int(Rnd * 6) + 5
If thirst >= 100 THEN 'pour pas depasser 100
thirst = 100
End if
If hunger >= 100 THEN 'pour pas depasser 100
hunger = 100
End if
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy    : " energy
sleep

Case 0.33 To 0.66 ' 34% chance of this outcome
Print "You find some coconuts that will soon be ready to eat. You take as many as you possibly can to swim back to your camp."
food = food + 25
thirst = thirst - 10
If food >= 100 THEN 'pour pas depasser 100
food = 100
end if
print "Food left        : " food
print "Current thirst    : " thirst
sleep

Case Else

Print "Unfortunately, you do not find anything interesting on this small island."
hunger = hunger - 8
thirst = thirst - 8
print ""
print "Current hunger    : " hunger
print "Current thirst    : " thirst
print "Current energy    : " energy
sleep

End select
case 6 ' Plage de galets
energy = energy - 1

case 7 ' Vieux batWater echoue
energy = energy - 1

end select
case 6 'deserts
FOR s = 1 TO 6 STEP 2
PRINT s; deserts(s),, s + 1; deserts(s + 1)
NEXT s
print ""
Input " Select the desert you would like to explore : ";choixdeserts
print ""

select case choixdeserts

case 1 'Desert cotier
energy = energy - 1

case 2 ' Desert de dunes
energy = energy - 75
desert& = _LOADIMAGE("desert.png", 32)
_PUTIMAGE (1325, 1), desert&
_FREEIMAGE desert&

case 3 ' Desert de roche
energy = energy - 1

case 4 ' Desert de sel
energy = energy - 1

case 5 ' Desert aride
energy = energy - 1

case 6 ' Oasis
energy = energy - 1
oasis& = _LOADIMAGE("oasis.png", 32)
_PUTIMAGE (1325, 1), oasis&
_FREEIMAGE oasis&
sleep




end select

case 7 'volcans

FOR s = 1 TO 4 STEP 2
PRINT s; volcanoes(s),, s + 1; volcanoes(s + 1)
NEXT s
print ""
Input " Select the volcano you would like to explore : ";choixvolcanoes
print ""

select case choixvolcanoes

case 1 'Volcan actif
energy = energy - 1

case 2 ' Volcan eteint
energy = energy - 1

case 3 ' Cratere some volcan
energy = energy - 1

case 4 ' Champ de lave
energy = energy - 1


end select

case 8 'grottes

FOR s = 1 TO 4 STEP 2
PRINT s; caves(s),, s + 1; caves(s + 1)
NEXT s
print ""
Input " Select the cave you would like to explore : ";choixcaves
print ""

select case choixcaves

Case 1 'grotte de calcaire
energy = energy - 1

Case 2 'grotte de lave
energy = energy - 1

Case 3 'riviere souterraine
energy = energy - 1

Case 4 'grottes marines
energy = energy - 1
print "It's humid here."

End Select

case 9 'falaises

FOR s = 1 TO 4 STEP 2
PRINT s; cliffs(s),, s + 1; cliffs(s + 1)
NEXT s
print ""
Input " Select the cliffs you would like to explore : ";choixcliffs
print ""

select case choixcliffs

Case 1 'Falaises escarpees
energy = energy - 1

Case 2 'Falaises maritimes
maritimecliffs& = _LOADIMAGE("maritimecliffs.png", 32)
_PUTIMAGE (1325, 1), maritimecliffs&
_FREEIMAGE maritimecliffs&
energy = energy - 1

Case 3 'Falaises fluviales
energy = energy - 1

Case 4 'Falaises de gres
energy = energy - 1
print "gre lol"

End Select

End select


CASE 20 'Description des equipments
CLS
Print "Equipment description"
print ""
If bonespear.equipmentcount >= 1 Then
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
bonespearcount& = _LOADIMAGE("bonespear.png", 32)
print "  Bone spear          :" bonespear.equipmentcount; "  Damage : " bonespear.equipmentdamage; "  Defense : " bonespear.equipmentdefense; "  Durability : " bonespear.equipmentdurability
_PUTIMAGE (X, Y), bonespearcount&
print ""
_FREEIMAGE bonespearcount&
Else
end if

If flintspear.equipmentcount >= 1 Then
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
flintspearcount& = _LOADIMAGE("flintspear.png", 32)
print "  Flint spear        :" flintspear.equipmentcount; "  Damage : " flintspear.equipmentdamage; "  Defense : " flintspear.equipmentdefense; "  Durability : " flintspear.equipmentdurability
_PUTIMAGE (X, Y), flintspearcount&
print ""
_FREEIMAGE flintspearcount&
Else
end if

If copperspear.equipmentcount >= 1 Then
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
copperspearcount& = _LOADIMAGE("copperspear.png", 32)
print "  Copper spear        :" copperspear.equipmentcount; "  Damage : " copperspear.equipmentdamage; "  Defense : " copperspear.equipmentdefense; "  Durability : " copperspear.equipmentdurability
_PUTIMAGE (X, Y), copperspearcount&
print ""
_FREEIMAGE copperspearcount&
Else
end if

If ironspear.equipmentcount >= 1 Then
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
ironspearcount& = _LOADIMAGE("ironspear.png", 32)
print "  Iron spear          :" ironspear.equipmentcount; "  Damage : " ironspear.equipmentdamage; "  Defense : " ironspear.equipmentdefense; "  Durability : " ironspear.equipmentdurability
_PUTIMAGE (X, Y), ironspearcount&
print ""
_FREEIMAGE ironspearcount&
Else
end if

' If stoneaxe.equipmentcount >= 1 Then
' X = (POS(0) - 1) * _FONTWIDTH
' Y = (CSRLIN - 1) * _FONTHEIGHT
' stoneaxecount& = _LOADIMAGE("stoneaxe.png", 32)
' print "  Stone axe    :" stoneaxe.equipmentcount; "  Damage : " stoneaxe.equipmentdamage; "  Defense : " stoneaxe.equipmentdefense; "  Durability : " stoneaxe.equipmentdurability
' _PUTIMAGE (X, Y), stoneaxecount&
' print ""
' _FREEIMAGE stoneaxecount&
' Else
' end if

' If copperaxe.equipmentcount >= 1 Then
' X = (POS(0) - 1) * _FONTWIDTH
' Y = (CSRLIN - 1) * _FONTHEIGHT
' copperaxecount& = _LOADIMAGE("copperaxe.png", 32)
' print "  Copper axe    :" copperaxe.equipmentcount; "  Damage : " copperaxe.equipmentdamage; "  Defense : " copperaxe.equipmentdefense; "  Durability : " copperaxe.equipmentdurability
' _PUTIMAGE (X, Y), copperaxecount&
' print ""
' _FREEIMAGE copperaxecount&
' Else
' end if

' If ironaxe.equipmentcount >= 1 Then
' X = (POS(0) - 1) * _FONTWIDTH
' Y = (CSRLIN - 1) * _FONTHEIGHT
' ironaxecount& = _LOADIMAGE("ironaxe.png", 32)
' print "  Iron axe        :" ironaxe.equipmentcount; "  Damage : " ironaxe.equipmentdamage; "  Defense : " ironaxe.equipmentdefense; "  Durability : " ironaxe.equipmentdurability
' _PUTIMAGE (X, Y), ironaxecount&
' print ""
' _FREEIMAGE ironaxecount&
' Else
' end if

'Hide
If skingloves.equipmentcount >= 1 Then
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
skingloves& = _LOADIMAGE("skingloves.png", 32)
print "  Hide gloves        :" skingloves.equipmentcount; "  Damage : " skingloves.equipmentdamage; "  Defense : " skingloves.equipmentdefense; "  Durability : " skingloves.equipmentdurability
_PUTIMAGE (X, Y), skingloves&
print ""
_FREEIMAGE skingloves&
Else
end if


If skinhelmet.equipmentcount >= 1 Then
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
skinhelmet& = _LOADIMAGE("skinhelmet.png", 32)
print "  Hide helmet        :" skinhelmet.equipmentcount; "  Damage : " skinhelmet.equipmentdamage; "  Defense : " skinhelmet.equipmentdefense; "  Durability : " skinhelmet.equipmentdurability
_PUTIMAGE (X, Y), skinhelmet&
print ""
_FREEIMAGE skinhelmet&
Else
end if


If skinshoes.equipmentcount >= 1 Then
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
skinshoes& = _LOADIMAGE("skinshoes.png", 32)
print "  Hide shoes          :" skinshoes.equipmentcount; "  Damage : " skinshoes.equipmentdamage; "  Defense : " skinshoes.equipmentdefense; "  Durability : " skinshoes.equipmentdurability
_PUTIMAGE (X, Y), skinshoes&
print ""
_FREEIMAGE skinshoes&
Else
end if


If skinarmor.equipmentcount >= 1 Then
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
skinarmor& = _LOADIMAGE("skinarmor.png", 32)
print "  Hide armor          :" skinarmor.equipmentcount; "  Damage : " skinarmor.equipmentdamage; "  Defense : " skinarmor.equipmentdefense; "  Durability : " skinarmor.equipmentdurability
_PUTIMAGE (X, Y), skinarmor&
print ""
_FREEIMAGE skinarmor&
Else
end if

'Leather
If leathergloves.equipmentcount >= 1 Then
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
leathergloves& = _LOADIMAGE("leathergloves.png", 32)
print "  Leather gloves      :" leathergloves.equipmentcount; "  Damage : " leathergloves.equipmentdamage; "  Defense : " leathergloves.equipmentdefense; "  Durability : " leathergloves.equipmentdurability
_PUTIMAGE (X, Y), leathergloves&
print ""
_FREEIMAGE leathergloves&
Else
end if


If leatherhelmet.equipmentcount >= 1 Then
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
leatherhelmet& = _LOADIMAGE("leatherhelmet.png", 32)
print "  Leather helmet      :" leatherhelmet.equipmentcount; "  Damage : " leatherhelmet.equipmentdamage; "  Defense : " leatherhelmet.equipmentdefense; "  Durability : " leatherhelmet.equipmentdurability
_PUTIMAGE (X, Y), leatherhelmet&
print ""
_FREEIMAGE leatherhelmet&
Else
end if


If leathershoes.equipmentcount >= 1 Then
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
leathershoes& = _LOADIMAGE("leathershoes.png", 32)
print "  Leather shoes      :" leathershoes.equipmentcount; "  Damage : " leathershoes.equipmentdamage; "  Defense : " leathershoes.equipmentdefense; "  Durability : " leathershoes.equipmentdurability
_PUTIMAGE (X, Y), leathershoes&
print ""
_FREEIMAGE leathershoes&
Else
end if


If leatherarmor.equipmentcount >= 1 Then
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
leatherarmor& = _LOADIMAGE("leatherarmor.png", 32)
print "  Leather armor      :" leatherarmor.equipmentcount; "  Damage : " leatherarmor.equipmentdamage; "  Defense : " leatherarmor.equipmentdefense; "  Durability : " leatherarmor.equipmentdurability
_PUTIMAGE (X, Y), leatherarmor&
print ""
_FREEIMAGE leatherarmor&
Else
end if

'''''''''''start Armor defense & Weapon attack check block''''''''''
'---- armor
If leathergloves.equipmentcount >= 1 THEN
defense = defense + 2
elseIf skingloves.equipmentcount >= 1 THEN
defense = defense + 1
else defense = defense
end if
If leathershoes.equipmentcount >= 1 THEN
defense = defense + 2
elseIf skinshoes.equipmentcount >= 1 THEN
defense = defense + 1
else defense = defense
end if
If leatherhelmet.equipmentcount >= 1 THEN
defense = defense + 2
elseIF skinhelmet.equipmentcount >= 1 THEN
defense = defense + 1
else defense = defense
end if
If leatherarmor.equipmentcount >= 1 THEN
defense = defense + 3
elseIF skinarmor.equipmentcount >= 1 THEN
defense = defense + 2
else defense = defense
end if
'---- weapons
If ironspear.equipmentcount >= 1 THEN
damage = damage + 8
ELSEIF copperspear.equipmentcount >= 1 THEN
damage = damage + 6
ELSEIF flintspear.equipmentcount >= 1 THEN
damage = damage + 4
elseIf bonespear.equipmentcount >= 1 THEN
damage = damage + 2
ELSE
damage = damage
end if
'''''''''''end Armor defense & Weapon attack check block''''''''''
Print "Your defense using the best armors possible :"; defense
print "Your damage using the best weapons possible : "; damage
sleep
defense = 0 'retour a zero apres avoir check
damage = 2' reout a zeo apres avoir check

CASE 21 'Campement
cls
settlement& = _LOADIMAGE("settlement.png", 32)
_PUTIMAGE (192, 220), settlement&
_FREEIMAGE settlement&
sleep

case 22 'carte de l'ile
cls
if map = 1 then
island& = _LOADIMAGE("island.png", 32)
_PUTIMAGE (448, 28), island&
_FREEIMAGE island&

ELSE
print "You haven't mapped the island yet"
_delay 0.9
print "You will need something to draw with a medium on which to draw."
end if


sleep
CLS

case 23 ' aide
CLS
print ""
PRINT " You are stranded on a giant desert island"
_delay 0.3
PRINT " You must survive the longest possible (and try to return to civilization... or not)"
_delay 0.3
PRINT " Your priority is to build a shelter and to upgrade your camp to shelter yourself from the elements. Once you have properly settled, exploring the island will be easier"
_delay 0.3
PRINT " The most difficult is the beginning..."
_delay 0.3
PRINT " Description of the actions : "
print ""
_delay 0.3
PRINT "  Eat"
_delay 0.2
PRINT "  - Consume 10 units of food to fill the hunger bar."
print ""
_delay 0.2
PRINT "  Drink"
_delay 0.2
PRINT "  - Consume 10 units of water to fill the thirst bar."
print ""
_delay 0.2
PRINT "  Rest"
_delay 0.2
PRINT "  - Allows you to rest for a while to recuperate and gain energy. Some buildings can bring more comfort."
print ""
_delay 0.2
PRINT "  Look for food, water, or both"
_delay 0.2
PRINT "  - Allows you to pick up and store food and water. A container can help gather more water at once."
print ""
_delay 0.2
PRINT "  Fish"
_delay 0.2
PRINT "  - Allows you to find food, but takes longer and is more random. You can't catch fish with your bare hands."
print ""
_delay 0.2
PRINT "  Wash in the ocean "
_delay 0.2
PRINT "  - Allows you to fill the hygiene bar. Perhaps is there a better solution for it?"
print ""
_delay 0.2
PRINT "  Light a fire"
_delay 0.2
PRINT "  - Allows you to make a fire in order to warm yourself up and fill the warmth bar. You need some wood to make a fire."
print ""
_delay 0.2
PRINT "  Build"
_delay 0.2
PRINT "  - Allows you to build some useful objects for your camp. Left to the joy of discovery."
print ""
_delay 0.2
PRINT "  Craft"
_delay 0.2
PRINT "  - Allows you to craft useful items, including tools and weapons."
print ""
_delay 0.2
PRINT "  Look for rock and wood"
_delay 0.2
PRINT "  - Several buildings require those two base resources. This option allows to look for both at the same time. Practical !"
print ""
_delay 0.2
PRINT "  Gather..."
_delay 0.2
PRINT "  - Allows to look for a specific resource. Some resources can be collected in higher quantity with the proper tools."
print ""
_delay 0.2
PRINT "  Wait half and hour..."
_delay 0.2
PRINT "  - Waits half an hour without doing anything. As every minute counts, this action is not recommended..."
print ""
_delay 0.2
PRINT "  Wait an hour..."
_delay 0.2
PRINT "  - Waits to wait an hour without doing anything. As every minute counts, this action is not recommended..."
print ""
_delay 0.2
PRINT "  Status and buildings"
_delay 0.2
PRINT "  - Used to visualize stats bars more precisely and see buildings built"
print ""
_delay 0.2
PRINT "  Inventory"
_delay 0.2
PRINT "  - Used to visualize the inventory on only one screen."
print ""
_delay 0.2
PRINT "  Hunt..."
_delay 0.2
PRINT "  - Allows you to hunt some animals to get food and resources. Dangerous without the proper equipment. Check your combat stats before choosing an animal to hunt"
print ""
_delay 0.2
PRINT "  Explore..."
_delay 0.2
PRINT "  - Allows you to explore the immensity of the island and its various places. Each expedition costs maximum 75 energy and some other stats. It can be dangerous but gratifying. At your own risks!"
print ""
_delay 0.2
PRINT "  Equipment description"
_delay 0.2
PRINT "  - Display equipment stats (Weapons and armors)"
print ""
_delay 0.2
PRINT "  Help"
_delay 0.2
PRINT "  - Display this page"
_delay 0.2
        sleep

case 24 ' quitter
end
end select  'FIN DE LA SELECTION DES CAS


'Condition check avant chaque nouvelle boucle
If minutes >= 60 THEN
            hour = hour +1
            minutes = minutes -60
end if

        iF hour >= 24 THEN 
          day = day + 1
  newdaywatercollector = newdaywatercollector + 1
  newdaysickness = newdaysickness + 1
  newdayfireplace = newdayfireplace + 1
  newdayleather = newdayleather + 1
  newdaytar = newdaytar + 1
          hour = hour - 24 ' Adjust the hour value
end if

if (newdayleather >= 1) and (leatherstart >= 1) THEN
leathercountdown = leathercountdown + 1
newdayleather = 0
ELSE
newdayleather = 0
end if

if (newdaytar >= 1) and (tarstart >= 1) THEN
tarcountdown = tarcountdown + 1
newdaytar = 0
ELSE
newdaytar = 0
end if

if (leathercountdown >= 5) and (leatherstart >= 1) then
  DO UNTIL leatherstart = 0
cls
_delay 0.2
drip& = _SNDOPEN("drip.mp3")
_SNDPLAY drip&
leather = leather + 1
leatherstart = leatherstart - 1
locate 32,108
Print "A piece of leather is ready."
_delay 0.5
locate 33,113
print "Leather left : " leather
_delay 0.8
loop
leathercountdown = leathercountdown - 5
sleep
CLS
end if

if (tarcountdown >= 3) and (tarstart >= 1) then
  DO UNTIL tarstart = 0
cls
_delay 0.2
drip& = _SNDOPEN("drip.mp3")
_SNDPLAY drip&
tar = tar + 1
tarstart = tarstart - 1
locate 32,108
Print "You collected a bucket of tar."
_delay 0.5
locate 33,113
print "Tar left : " tar
_delay 0.8
loop
tarcountdown = tarcountdown - 3
sleep
CLS
end if






If (newdaysickness >= 1) and (abscess = 1) Then
CLS
locate 32,96
hunger = hunger - 40
newdaysickness = 0
print "Due to the abscess, your hunger increases by 40..."
sleep
ELSEIF (newdaysickness >= 1) and (sorethroat = 1) then
CLS
locate 32,80
thirst = thirst - 40
hunger = hunger - 4
hygiene = hygiene - 20
newdaysickness = 0
print "Due to the sore throat, your thirst increases by 40, your hunger by 4 and your hygiene decreases by 20..."
sleep
ELSEIF (newdaysickness >= 1) and (asthma = 1) then
CLS
locate 32,95
hygiene = hygiene - 40
health = health -12
newdaysickness = 0
print "Due to the asthma, your hygiene decreases by 40, and your health by 12..."
sleep
ELSEIF (newdaysickness >= 1) and (bronchitis = 1) then
CLS
locate 32,94
thirst = thirst - 40
health = health - 4
hygiene = hygiene - 8
newdaysickness = 0
print "Due to the bronchitis, your thirst increases by 40 and your health decreases by 12..."
sleep
ELSEIF (newdaysickness >= 1) and (diarrhea = 1) then
CLS
locate 32,101
thirst = thirst - 20
health = health - 2
newdaysickness = 0
print "Due to the diarrhea, your thirst increases by 20 and your health decreases by 2..."
sleep
ELSEIF (newdaysickness >= 1) and (fever = 1) then
CLS
locate 32,101
hygiene = hygiene - 20
health = health - 4
newdaysickness = 0
print "Due to the fever, your hygiene decreases by 20 and your health by 4..."
sleep
ELSEIF (newdaysickness >= 1) and (flu = 1) then
CLS
locate 32,85
hygiene = hygiene - 40
health = health - 20
newdaysickness = 0
print "Due to the flu, your hygiene decreases by 40 and your health by 20..."
sleep
ELSEIF (newdaysickness >= 1) and (infection = 1) then
CLS
locate 32,101
health = health - 4
newdaysickness = 0
print "Due to the infection, your health decreases by 4..."
sleep
ELSEIF (newdaysickness >= 1) and (commoncold = 1) then
CLS
locate 32,101
thirst = thirst - 20
hunger = hunger - 4
health = health - 4
newdaysickness = 0
print "Due to your cold, your thirst increases by 20, your hunger by 4 and your health decreases by 4..."
sleep
ELSEIF (newdaysickness >= 1) and (conjunctivitis = 1) then
CLS
locate 32,101
health = health - 20
newdaysickness = 0
print "Due to the conjunctivitis, your health decreases by 40"
sleep
elseif (newdaysickness >= 1) and (lightpoison = 1) then
CLS
locate 32,101
health = health - 50
newdaysickness = 0
poison& = _SNDOPEN("poison.mp3")
_SNDPLAY poison&
print "You lose 50 health due to the poison..."
sleep
else
end if


IF hunger <= 0 THEN
health = health - 10
lowbar& = _SNDOPEN("lowbar.mp3")
_SNDPLAY lowbar&
        END if

IF thirst <= 0 THEN
            health = health - 10
lowbar& = _SNDOPEN("lowbar.mp3")
_SNDPLAY lowbar&
        END IF

IF warmth <= 0 THEN
health = health - 10
lowbar& = _SNDOPEN("lowbar.mp3")
_SNDPLAY lowbar&
END IF

IF hygiene <= 0 THEN
health = health - 10
lowbar& = _SNDOPEN("lowbar.mp3")
_SNDPLAY lowbar&
END IF


IF energy <= 0 THEN
            health = health - 5
lowbar& = _SNDOPEN("lowbar.mp3")
_SNDPLAY lowbar&
END IF



'check daily events

If (newdaywatercollector >= 1) and (watercollector = 1) then
CLS
locate 32,102
water = water + 10
newdaywatercollector = 0
Print "You collect +10 Water from the water collector!"
sleep
CLS
else
  newdaywatercollector = 0
end if

If (newdayfireplace >= 1) and (fireplace = 1) then
CLS
locate 32,100
warmth = warmth + 10
newdayfireplace = 0
Print "You get +10 warmth with your fireplace!"
sleep
CLS
else
newdayfireplace = 0
end if

If newday >= 1 then
newday = newday = 0
end if

'''''''''''''''''''
If food <= 0 THEN
            food = 0
        End if

If water <= 0 THEN
            water = 0
        End if

'''''''''''''''''
       
        If health >= 100 THEN
            health = 100
        End if
       
        If energy >= 100 THEN
            energy = 100
        End if

If thirst >= 100 THEN
            thirst = 100
        End if

If hunger >= 100 THEN
            hunger = 100
        End if

If warmth >= 100 THEN
            warmth = 100
        End if

If hygiene >= 100 then
hygiene = 100
end if

''''''''''''''''''

If energy <= 0 THEN
            energy = 0
        End if

If thirst <= 0 THEN
            thirst = 0
        End if

If hunger <= 0 THEN
            hunger = 0
        End if

If warmth <= 0 THEN
            warmth = 0
        End if

If hygiene <= 0 then
hygiene = 0
end if

defense = 0 'retour a la valeur de depart
damagetaken = 0 'juste au cas ou
damage = 2 'retour a la valeur de depart

''''''''Start Check remove durability'''''''''''
'Hide
If (skingloves.equipmentdurability <= 0) AND (skingloves.equipmentcount >= 2) THEN
skingloves.equipmentcount = skingloves.equipmentcount - 1
skingloves.equipmentdurability = skingloves.equipmentdurability + 15
print "The hide gloves you were wearing were destroyed! You put on another pair"
_delay 1.2
elseif (skingloves.equipmentdurability <= 0) AND (skingloves.equipmentcount = 1) THEN
skingloves.equipmentcount = skingloves.equipmentcount - 1
print "The hide gloves you were wearing were destroyed!"
_delay 1.2
else
end if

If (skinshoes.equipmentdurability <= 0) AND (skinshoes.equipmentcount >= 2) THEN
skinshoes.equipmentcount = skinshoes.equipmentcount - 1
skinshoes.equipmentdurability = skinshoes.equipmentdurability + 15
print "The hide shoes you were wearing were destroyed! You put on another pair"
_delay 1.2
elseif (skinshoes.equipmentdurability <= 0) AND (skinshoes.equipmentcount = 1) THEN
skinshoes.equipmentcount = skinshoes.equipmentcount - 1
print "The hide shoes you were wearing were destroyed!"
_delay 1.2
else
end if

If (skinhelmet.equipmentdurability <= 0) AND (skinhelmet.equipmentcount >= 2) THEN
skinhelmet.equipmentcount = skinhelmet.equipmentcount - 1
skinhelmet.equipmentdurability = skinhelmet.equipmentdurability + 15
print "The hide helmet you were wearing was destroyed! You put on another one."
_delay 1.2
elseif (skinhelmet.equipmentdurability <= 0) AND (skinhelmet.equipmentcount = 1) THEN
skinhelmet.equipmentcount = skinhelmet.equipmentcount - 1
print "The hide helmet you were wearing was destroyed!"
_delay 1.2
else
end if

If (skinarmor.equipmentdurability <= 0) AND (skinarmor.equipmentcount >= 2) THEN
skinarmor.equipmentcount = skinarmor.equipmentcount - 1
skinarmor.equipmentdurability = skinarmor.equipmentdurability + 30
print "The hide armor you were wearing was destroyed! You put on another one."
_delay 1.2
elseif (skinarmor.equipmentdurability <= 0) AND (skinarmor.equipmentcount = 1) THEN
skinarmor.equipmentcount = skinarmor.equipmentcount - 1
print "The hide armor you were wearing was destroyed!"
_delay 1.2
else
end if
'Leather
If (leathergloves.equipmentdurability <= 0) AND (leathergloves.equipmentcount >= 2) THEN
leathergloves.equipmentcount = leathergloves.equipmentcount - 1
leathergloves.equipmentdurability = leathergloves.equipmentdurability + 15
print "The leather gloves you were wearing were destroyed! You put on another pair"
_delay 1.2
elseif (leathergloves.equipmentdurability <= 0) AND (leathergloves.equipmentcount = 1) THEN
leathergloves.equipmentcount = leathergloves.equipmentcount - 1
print "The leather gloves you were wearing were destroyed!"
_delay 1.2
else
end if

If (leathershoes.equipmentdurability <= 0) AND (leathershoes.equipmentcount >= 2) THEN
leathershoes.equipmentcount = leathershoes.equipmentcount - 1
leathershoes.equipmentdurability = leathershoes.equipmentdurability + 15
print "The leather shoes you were wearing were destroyed! You put on another pair"
_delay 1.2
elseif (leathershoes.equipmentdurability <= 0) AND (leathershoes.equipmentcount = 1) THEN
leathershoes.equipmentcount = leathershoes.equipmentcount - 1
print "The leather shoes you were wearing were destroyed!"
_delay 1.2
else
end if

If (leatherhelmet.equipmentdurability <= 0) AND (leatherhelmet.equipmentcount >= 2) THEN
leatherhelmet.equipmentcount = leatherhelmet.equipmentcount - 1
leatherhelmet.equipmentdurability = leatherhelmet.equipmentdurability + 15
print "The leather helmet you were wearing was destroyed! You put on another one"
_delay 1.2
elseif (leatherhelmet.equipmentdurability <= 0) AND (leatherhelmet.equipmentcount = 1) THEN
leatherhelmet.equipmentcount = leatherhelmet.equipmentcount - 1
print "The leather helmet you were wearing was destroyed!"
_delay 1.2
else
end if

If (leatherarmor.equipmentdurability <= 0) AND (leatherarmor.equipmentcount >= 2) THEN
leatherarmor.equipmentcount = leatherarmor.equipmentcount - 1
leatherarmor.equipmentdurability = leatherarmor.equipmentdurability + 30
print "The leather armor you were wearing was destroyed! You put on another one"
_delay 1.2
elseif (leatherarmor.equipmentdurability <= 0) AND (leatherarmor.equipmentcount = 1) THEN
leatherarmor.equipmentcount = leatherarmor.equipmentcount - 1
print "The leather armor you were wearing was destroyed!"
_delay 1.2
else
end if

If (ironspear.equipmentdurability <= 0) AND (ironspear.equipmentcount >= 2) THEN
ironspear.equipmentcount = ironspear.equipmentcount - 1
ironspear.equipmentdurability = ironspear.equipmentdurability + 50
print "Your Iron spear was destroyed! You use another one."
_delay 1.2
elseif (ironspear.equipmentdurability <= 0) AND (ironspear.equipmentcount = 1) THEN
ironspear.equipmentcount = ironspear.equipmentcount - 1
print "Your Iron spear was destroyed!"
_delay 1.2
else
end if

If (copperspear.equipmentdurability <= 0) AND (copperspear.equipmentcount >= 2) THEN
copperspear.equipmentcount = copperspear.equipmentcount - 1
copperspear.equipmentdurability = copperspear.equipmentdurability + 40
print "Your Copper spear was destroyed! You use another one."
_delay 1.2
elseif (copperspear.equipmentdurability <= 0) AND (copperspear.equipmentcount = 1) THEN
copperspear.equipmentcount = copperspear.equipmentcount - 1
print "Your Copper spear was destroyed!"
_delay 1.2
else
end if

If (flintspear.equipmentdurability <= 0) AND (flintspear.equipmentcount >= 2) THEN
flintspear.equipmentcount = flintspear.equipmentcount - 1
flintspear.equipmentdurability = flintspear.equipmentdurability + 30
print "Your Flint spear was destroyed! You use another one."
_delay 1.2
elseif (flintspear.equipmentdurability <= 0) AND (flintspear.equipmentcount = 1) THEN
flintspear.equipmentcount = flintspear.equipmentcount - 1
print "Your Flint spear was destroyed!"
_delay 1.2
else
end if

If (bonespear.equipmentdurability <= 0) AND (bonespear.equipmentcount >= 2) THEN
bonespear.equipmentcount = bonespear.equipmentcount - 1
bonespear.equipmentdurability = bonespear.equipmentdurability + 20
print "Your Bone spear was destroyed! You use another one."
_delay 1.2
elseif (bonespear.equipmentdurability <= 0) AND (bonespear.equipmentcount = 1) THEN
bonespear.equipmentcount = bonespear.equipmentcount - 1
print "Your Bone spear was destroyed!"
_delay 1.2
else
end if

''''''''End Check remove durability'''''''''''

'''''''check maladies'''''''''
If abscess = 1 Then
locate 32,101
healthstatus = "Suffering from an abscess (Increases hunger by 40 every day)"
ELSEIF sorethroat = 1 then
locate 32,101
healthstatus = "Suffering from a sore throat (Increases thirst by 40, hunger by 4 and decreases hygiene by 20 every day)"
ELSEIF asthma = 1 then
locate 32,101
healthstatus = "Suffering from asthma (Decreases hygiene by 40 health by 12 every day)"
ELSEIF bronchitis = 1 then
locate 32,101
healthstatus = "Suffering from bronchitis (Increases thirst by 40 and decreases health by 4 and hygiene by 8 every day)"
ELSEIF diarrhea = 1 then
locate 32,101
healthstatus = "Suffering from diarrhea (Increases thirst by 20 and decreases health by 2 every day)"
ELSEIF fever = 1 then
locate 32,101
healthstatus = "Suffering from fever (Decreases hygiene by 20 and health by 4 every day)"
ELSEIF flu = 1 then
locate 32,101
healthstatus = "Suffering from the flu (Decreases hygiene by 40 and health by 20 every day)"
ELSEIF infection = 1 then
locate 32,101
healthstatus = "Suffering from an infection (Decreases health by 4 every day)"
ELSEIF commoncold = 1 then
locate 32,101
healthstatus = "Suffering from a cold (Increases thirst by 20 and hunger by 4 and decreases health by 4 every day)"
ELSEIF conjunctivitis = 1 then
locate 32,101
healthstatus = "Suffering from conjunctivitis (Decreases health by 40 every day)"
ELSEIF lightpoison = 1 then
locate 32,101
healthstatus = "Poisoned (Decreases health by 50 every day)"
else
end if
''fin check maladie''''''''''''''''''''

'''''''''''''''''

               
   
'Evenements aleatoires :

If (day >= 3) AND (event3 = 0) then
_delay 2
CLS
event3 = event3 + 1
'son moustique
mosquito& = _SNDOPEN("mosquito.mp3")
_SNDPLAY mosquito&
print ""
print "A mosquito attacks you!"
_delay 1.8
CLS
'''''''''''start Armor defense & Weapon attack check block''''''''''
'---- armor
If leathergloves.equipmentcount >= 1 THEN
defense = defense + 2
elseIf skingloves.equipmentcount >= 1 THEN
defense = defense + 1
else defense = defense
end if
If leathershoes.equipmentcount >= 1 THEN
defense = defense + 2
elseIf skinshoes.equipmentcount >= 1 THEN
defense = defense + 1
else defense = defense
end if
If leatherhelmet.equipmentcount >= 1 THEN
defense = defense + 2
elseIF skinhelmet.equipmentcount >= 1 THEN
defense = defense + 1
else defense = defense
end if
If leatherarmor.equipmentcount >= 1 THEN
defense = defense + 3
elseIF skinarmor.equipmentcount >= 1 THEN
defense = defense + 2
else defense = defense
end if
'---- weapons
If ironspear.equipmentcount >= 1 THEN
damage = damage + 8
ELSEIF copperspear.equipmentcount >= 1 THEN
damage = damage + 6
ELSEIF flintspear.equipmentcount >= 1 THEN
damage = damage + 4
elseIf bonespear.equipmentcount >= 1 THEN
damage = damage + 2
ELSE
damage = damage
end if
'''''''''''end Armor defense & Weapon attack check block''''''''''
do UNTIL (health <= 0) OR (mosquitohealth <= 0)
'image?
print ""
locate 2,1
print "Enemy                : "  mosquitoname
locate 3,2
print "Enemy damage        : "  mosquitodamage
locate 4,3
print "Enemy defense        : "  mosquitodefense
locate 5,4
print "Enemy health        : "  mosquitohealth
locate 6,5
print ""
locate 7,6
print "You                    " 
locate 8,7
print "Your damage          : "  damage
locate 9,8
print "Your defense        : "  defense
locate 10,9
print "Your health          : "  health
locate 11,10
_delay 0.5
print ""
locate 12,11
print ""

hit& = _SNDOPEN("hit.mp3")
_SNDPLAY hit&
locate 13,12
print "You attack the " mosquitoname
damagetaken = damage - mosquitodefense
if damagetaken < 0 then
damagetaken = 0
end if
mosquitohealth = mosquitohealth - damagetaken

_delay 0.5
hit& = _SNDOPEN("hit.mp3")
_SNDPLAY hit&
locate 14,13
print "Enemy health  " mosquitohealth
locate 15,14
print ""
locate 16,15
print ""
locate 17,16
print "The " mosquitoname " attacks you"
damagetaken = mosquitodamage - defense
if damagetaken < 0 then
damagetaken = 0
end if
health = health - damagetaken
_delay 0.5
locate 18,17
print "Your health        " health



sleep
CLS
loop

Print "The fight is over"
mosquitohealth = 1 'rendre la vie au moustique pour la prochaine fois
damage = 2 'retour a la valeur de depart
defense = 0 'retour a la valeur de depart


'''''''Start Check remove durability'''''''''''
IF leathergloves.equipmentcount >= 1 THEN
leathergloves.equipmentdurability = leathergloves.equipmentdurability - 1
elseIf skingloves.equipmentcount >= 1 THEN
skingloves.equipmentdurability = skingloves.equipmentdurability - 1
else
end if
IF leathershoes.equipmentcount >= 1 THEN
leathershoes.equipmentdurability = leathershoes.equipmentdurability - 1
elseIf skinshoes.equipmentcount >= 1 THEN
skinshoes.equipmentdurability = skinshoes.equipmentdurability - 1
else
end if
IF leatherhelmet.equipmentcount >= 1 THEN
leatherhelmet.equipmentdurability = leatherhelmet.equipmentdurability - 1
elseIF skinhelmet.equipmentcount >= 1 THEN
skinhelmet.equipmentdurability = skinhelmet.equipmentdurability - 1
else
end if
IF leatherarmor.equipmentcount >= 1 THEN
leatherarmor.equipmentdurability = leatherarmor.equipmentdurability - 1
elseIF skinarmor.equipmentcount >= 1 THEN
skinarmor.equipmentdurability = skinarmor.equipmentdurability - 1
else
end if
If ironspear.equipmentcount >= 1 THEN
ironspear.equipmentdurability = ironspear.equipmentdurability - 1
ELSEIF copperspear.equipmentcount >= 1 THEN
copperspear.equipmentdurability = copperspear.equipmentdurability - 1
ELSEIF flintspear.equipmentcount >= 1 THEN
flintspear.equipmentdurability = flintspear.equipmentdurability - 1
elseIf bonespear.equipmentcount >= 1 THEN
bonespear.equipmentdurability = bonespear.equipmentdurability - 1
ELSE
end if
''''''''End Check remove durability'''''''''''

print ""
print ""

healthBar$ = ""

FOR b = 1 TO INT(health/MAX_VALUE*75)
COLOR Red
healthBar$ = healthBar$ + "Û" ' Add a block character
NEXT b
PRINT "  Health:        "; healthBar$
print " "health
sleep
Color White 'retour au blanc
End If


If (day >= 9) AND (event1 = 0) then
_delay 1
cls

rain& = _SNDOPEN("rain.mp3")
_SNDPLAY rain&
event1 = event1 + 1
warmth = warmth - 50
if warmth <= 0 then
warmth = 0
end if
locate 32,88
print "It's raining hard and the temperature dropped. You feel cold"
_delay 1
locate 32,88
print "It's raining hard and the temperature dropped. You feel cold."
_Delay 1
locate 32,88
print "It's raining hard and the temperature dropped. You feel cold.."
_Delay 1
locate 32,88
print "It's raining hard and the temperature dropped. You feel cold..."
_Delay 1
'debut some fondu
Color LightGray
locate 32,88
print "It's raining hard and the temperature dropped. You feel cold..."
_Delay .4
Color DarkGray
locate 32,88
print "It's raining hard and the temperature dropped. You feel cold..."
_Delay .4
Color DimGray
locate 32,88
print "It's raining hard and the temperature dropped. You feel cold..."
_Delay .4
Color Black
locate 32,88
print "It's raining hard and the temperature dropped. You feel cold..."
_Delay .5


Color White 'retour au blanc
end if

If (day >= 16) AND (event4 = 0) THEN
_delay 1
CLS

event4 = event4 + 1
  sicknesscheck = INT(RND * 10) + 1 ' Generate a random number between 1 and 12
SELECT CASE sicknesscheck
CASE 1
' Use the abscess variable
abscess = 1
CASE 2
' Use the sorethroat variable
sorethroat = 1
CASE 3
' Use the asthma variable
asthma = 1
CASE 4
' Use the bronchitis variable
bronchitis = 1
CASE 5
' Use the diarrhea variable
diarrhea = 1
CASE 6
' Use the fever variable
fever = 1
CASE 7
' Use the flu variable
flu = 1
CASE 8
' Use the infection variable
infection = 1
CASE 9
commoncold = 1
' Use the commoncold variable
CASE 10
' Use the conjunctivitis variable
conjunctivitis = 1

Case ELSE
end select
_delay 1

If abscess = 1 Then
locate 32,101
print "You have caught an abscess..."
healthstatus = "Suffering from an abscess (Increases hunger by 40 every day)"
sleep
ELSEIF sorethroat = 1 then
locate 32,101
                print "You have caught sore throat..."
healthstatus = "Suffering from a sore throat (Increases thirst by 40, hunger by 4 and decreases hygiene by 20 every day)"
sleep
ELSEIF asthma = 1 then
locate 32,101
print "You have developed some asthma..."
healthstatus = "Suffering from asthma (Decreases hygiene by 40 and health by 12 every day)"
sleep
ELSEIF bronchitis = 1 then
locate 32,101
print "You have caught a bronchitis..."
healthstatus = "Suffering from a bronchitis (Increases thirst by 40 and decreases health by 4 and hygiene by 8 every day)"
sleep
ELSEIF diarrhea = 1 then
locate 32,101
print "You have caught a diarrhea..."
healthstatus = "Suffering from diarrhea (Increases thirst by 20 and decreases health by 2 every day)"
sleep
ELSEIF fever = 1 then
locate 32,101
print "You have caught a fever..."
healthstatus = "Suffering from a fever (Decreases hygiene by 20 and health by 4 every day)"
sleep
ELSEIF flu = 1 then
locate 32,101
print "You have caught the flu..."
healthstatus = "Suffering from the flu (Decreases hygiene by 40 and health by 20 every day)"
sleep
ELSEIF infection = 1 then
locate 32,101
print "You have caught an infection..."
healthstatus = "Suffering from an infection (Decreases health by 4 every day)"
sleep
ELSEIF commoncold = 1 then
locate 32,101
print "You have caught a cold..."
healthstatus = "Suffering from a cold (Increases thirst by 20 and hunger by 4 and decreases health by 4 every day)"
sleep
ELSEIF conjunctivitis = 1 then
locate 32,101
print "You have caught a conjunctivitis..."
healthstatus = "Suffering from a conjunctivitis (Decreases health by 40 every day)"
sleep
else
end if

'Color White 'retour au blanc
end if


If (day >= 21) AND (event2 = 0) then 'Ajouter son
_delay 1
cls

event2 = event2 + 1
warmth = warmth - 55
if warmth <= 0 then
warmth = 0
end if
locate 32,88
print "There is a very strong wind and the temperature dropped, you shiver"
_delay 1
locate 32,88
print "There is a very strong wind and the temperature dropped, you shiver."
_Delay 1
locate 32,88
print "There is a very strong wind and the temperature dropped, you shiver.."
_Delay 1
locate 32,88
print "There is a very strong wind and the temperature dropped, you shiver..."
_Delay 1
'debut some fondu
Color LightGray
locate 32,88
print "There is a very strong wind and the temperature dropped, you shiver..."
_Delay .3
Color DarkGray
locate 32,88
print "There is a very strong wind and the temperature dropped, you shiver..."
_Delay .3
Color DimGray
locate 32,88
print "There is a very strong wind and the temperature dropped, you shiver..."
_Delay .3
Color Black
locate 32,88
print "There is a very strong wind and the temperature dropped, you shiver..."
_Delay .5


Color White 'retour au blanc
end if


If (day >= 31) AND (event5 = 0) THEN
_delay 1
CLS

event5 = event5 + 1
  sicknesscheck = INT(RND * 10) + 1 ' Generate a random number between 1 and 12
SELECT CASE sicknesscheck
CASE 1
' Use the abscess variable
abscess = 1
CASE 2
' Use the sorethroat variable
sorethroat = 1
CASE 3
' Use the asthma variable
asthma = 1
CASE 4
' Use the bronchitis variable
bronchitis = 1
CASE 5
' Use the diarrhea variable
diarrhea = 1
CASE 6
' Use the fever variable
fever = 1
CASE 7
' Use the flu variable
flu = 1
CASE 8
' Use the infection variable
infection = 1
CASE 9
commoncold = 1
' Use the commoncold variable
CASE 10
' Use the conjunctivitis variable
conjunctivitis = 1

Case ELSE
end select
_delay 1

If abscess = 1 Then
locate 32,101
print "You have caught an abscess..."
healthstatus = "Suffering from an abscess (Increases hunger by 40 every day)"
sleep
ELSEIF sorethroat = 1 then
locate 32,101
                print "You have caught sore throat..."
healthstatus = "Suffering from a sore throat (Increases thirst by 40, hunger by 4 and decreases hygiene by 20 every day)"
sleep
ELSEIF asthma = 1 then
locate 32,101
print "You have developed some asthma..."
healthstatus = "Suffering from asthma (Decreases hygiene by 40 and health by 12 every day)"
sleep
ELSEIF bronchitis = 1 then
locate 32,101
print "You have caught a bronchitis..."
healthstatus = "Suffering from a bronchitis (Increases thirst by 40 and decreases health by 4 and hygiene by 8 every day)"
sleep
ELSEIF diarrhea = 1 then
locate 32,101
print "You have caught a diarrhea..."
healthstatus = "Suffering from diarrhea (Increases thirst by 20 and decreases health by 2 every day)"
sleep
ELSEIF fever = 1 then
locate 32,101
print "You have caught a fever..."
healthstatus = "Suffering from a fever (Decreases hygiene by 20 and health by 4 every day)"
sleep
ELSEIF flu = 1 then
locate 32,101
print "You have caught the flu..."
healthstatus = "Suffering from the flu (Decreases hygiene by 40 and health by 20 every day)"
sleep
ELSEIF infection = 1 then
locate 32,101
print "You have caught an infection..."
healthstatus = "Suffering from an infection (Decreases health by 4 every day)"
sleep
ELSEIF commoncold = 1 then
locate 32,101
print "You have caught a cold..."
healthstatus = "Suffering from a cold (Increases thirst by 20 and hunger by 4 and decreases health by 4 every day)"
sleep
ELSEIF conjunctivitis = 1 then
locate 32,101
print "You have caught a conjunctivitis..."
healthstatus = "Suffering from a conjunctivitis (Decreases health by 40 every day)"
sleep
else
end if

'Color White 'retour au blanc
end if
'''''
If shelter = 1 then
build(003) = "  Bed              (Cost: 10 Wood - 10 Leaves - 8 Vines)                          " 'lit a fois abri decouvert
build(008) = "  Brick shelter    (Cost: 30 Bricks - 15 Wood - 15 Leaves)                        " 'brick shelter, need shelter discovered
end if

If brickshelter = 1 then
build(003) = "  Bed              (Cost: 10 Wood - 10 Leafs - 8 Vines)                          " 'lit a fois abri decouvert
end if

'Game over
IF health <= 0 THEN

font& = _LOADFONT("C:\Windows\Fonts\papyrus.ttf", 64)
_FONT font&
dead& = _SNDOPEN("dead.mp3")
_SNDPLAY dead&
            FOR z = 1 TO 20
            Color Red
'locate 32,107
            locate 8,650
                PRINT ; "      You are dead      "
            _DELAY 0.10
            cls
'locate 32,107
            locate 8,650
            color White
            PRINT ; "      You are dead      "
_delay 0.10
cls
            NEXT z
            Print
            _delay 1
system
            END
end if
       
        CLS
PRINT " Day" ; day " " hour"h"minutes " -  Physical condition : ";
If healthstatus = "Normal" Then
color Limegreen
Print healthstatus
elseif healthstatus = "Poisoned (Decreases health by 50 every day)" THEN
COLOR Purple
print healthstatus
else
COLOR MediumVioletRed
print healthstatus
end if
        PRINT ""
print ""
'Locate 1, 147
'print " ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»"
COLOR Green 'pour que la couleur ne deborde pas quand la stat est a 0
       
energyBar$ = ""
       
        FOR a = 1 TO INT(energy/MAX_VALUE*75)
        COLOR Green
        energyBar$ = energyBar$ + "Û" ' Add a block character
        NEXT a
locate 45, 38 'fout en bas anj droite de la fenetre
PRINT "  Energy:      "; energyBar$
locate 46, 38
print " "energy

COLOR Red 'pour que la couleur ne deborde pas quand la stat est a 0

        healthBar$ = ""
       
        FOR b = 1 TO INT(health/MAX_VALUE*75)
        COLOR Red
        healthBar$ = healthBar$ + "Û" ' Add a block character
        NEXT b
locate 47, 38
        PRINT "  Health:      "; healthBar$
locate 48, 38
print " "health

COLOR Orange 'pour que la couleur ne deborde pas quand la stat est a 0

hungerBar$ = ""

FOR c = 1 TO INT(hunger/MAX_VALUE*75)
        COLOR Orange
        hungerBar$ = hungerBar$ + "Û" ' Add a block character
        NEXT c
locate 49, 38
        PRINT "  Hunger:      "; hungerBar$
locate 50, 38
print " "hunger

COLOR Blue 'pour que la couleur ne deborde pas quand la stat est a 0

thirstBar$ = ""

FOR d = 1 TO INT(thirst/MAX_VALUE*75)
        COLOR Blue
        thirstBar$ = thirstBar$ + "Û" ' Add a block character
        NEXT d
locate 51, 38
        PRINT "  Thirst:      "; thirstBar$
locate 52, 38
print " "thirst

COLOR LightSalmon 'pour que la couleur ne deborde pas quand la stat est a 0

warmthBar$ = ""

FOR g = 1 TO INT(warmth/MAX_VALUE*75)
        COLOR LightSalmon
        warmthBar$ = warmthBar$ + "±" ' Add a block character
        NEXT g
locate 53, 38
PRINT "  Warmth:      "; warmthBar$
locate 54, 38
print " "warmth

COLOR YellowGreen 'pour que la couleur ne deborde pas quand la stat est a 0

hygieneBar$ = ""

FOR g = 1 TO INT(hygiene/MAX_VALUE*75)
        COLOR YellowGreen
        hygieneBar$ = hygieneBar$ + "±" ' Add a block character
        NEXT g
locate 55, 38
        PRINT "  Hygiene:      "; hygieneBar$
locate 56, 38
print " "hygiene

COLOR Chocolate 'pour que la couleur ne deborde pas quand la stat est a 0

foodBar$ = ""

FOR e = 1 TO INT(food/MAX_VALUE*75)
        COLOR Chocolate
        foodBar$ = foodBar$ + "°" ' Add a block character
        NEXT e
locate 57, 38
PRINT "  Food:        "; foodBar$
locate 58, 38
print " "food

COLOR RoyalBlue 'pour que la couleur ne deborde pas quand la stat est a 0

waterBar$ = ""

FOR f = 1 TO INT(water/MAX_VALUE*75)
        COLOR RoyalBlue
        waterBar$ = waterBar$ + "°" ' Add a block character
        NEXT f
locate 59, 38
        PRINT "  Water:        "; waterBar$
locate 60, 38
print " "water
print ""
Color White 'retour au blanc
'inventaire sur ecran principal, locate 3
locate 20
Print "  Resources : "
If rock >= 1 Then
rock& = _LOADIMAGE("rock.png", 32)
print "  Rock              :" rock; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), rock&
print ""
_FREEIMAGE rock&
Else
end if

If wood >= 1 Then
wood& = _LOADIMAGE("wood.png", 32)
print "  Wood              :" wood; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), wood&
print ""
_FREEIMAGE wood&
Else
end if

If leaf >= 1 Then
leaf& = _LOADIMAGE("leaf.png", 32)
print "  Leaf              :" leaf; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), leaf&
print ""
_FREEIMAGE leaf&
Else
end if

If clay >= 1 Then
clay& = _LOADIMAGE("clay.png", 32)
print "  Clay              :" clay; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), clay&
print ""
_FREEIMAGE clay&
Else
end if

If flint >= 1 Then
flint& = _LOADIMAGE("flint.png", 32)
print "  Flint            :" flint; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), flint&
print ""
_FREEIMAGE flint&
Else
end if

If vine >= 1 Then
vine& = _LOADIMAGE("vine.png", 32)
print "  Vines            :" vine; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), vine&
print ""
_FREEIMAGE vine&
Else
end if

If plant >= 1 Then
plant& = _LOADIMAGE("plant.png", 32)
print "  Plant            :" plant; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), plant&
print ""
_FREEIMAGE plant&
Else
end if

If bark >= 1 Then
bark& = _LOADIMAGE("bark.png", 32)
print "  Bark              :" bark; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), bark&
print ""
_FREEIMAGE bark&
Else
end if

If kokiyas >= 1 Then
kokiyas& = _LOADIMAGE("kokiyas.png", 32)
print "  Seashells        :" kokiyas; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), kokiyas&
print ""
_FREEIMAGE kokiyas&
Else
end if

If sand >= 1 Then
sand& = _LOADIMAGE("sand.png", 32)
print "  Sand              :" sand; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), sand&
print ""
_FREEIMAGE sand&
Else
end if

If bone >= 1 Then
bone& = _LOADIMAGE("bone.png", 32)
print "  Bone              :" bone; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), bone&
print ""
_FREEIMAGE bone&
Else
end if

If copperore >= 1 Then
copperore& = _LOADIMAGE("copperore.png", 32)
print "  Copper ore        :" copperore; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), copperore&
print ""
_FREEIMAGE copperore&
Else
end if

If ironore >= 1 Then
ironore& = _LOADIMAGE("ironore.png", 32)
print "  Iron ore          :" ironore; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), ironore&
print ""
_FREEIMAGE ironore&
Else
end if

If coal >= 1 Then
coal& = _LOADIMAGE("coal.png", 32)
print "  Coal              :" coal; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), coal&
print ""
_FREEIMAGE coal&
Else
end if

If copperbar >= 1 Then
copperbar& = _LOADIMAGE("copperbar.png", 32)
print "  Copper bar        :" copperbar; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), copperbar&
print ""
_FREEIMAGE copperbar&
Else
end if

If ironbar >= 1 Then
ironbar& = _LOADIMAGE("ironbar.png", 32)
print "  Iron bar          :" ironbar; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), ironbar&
print ""
_FREEIMAGE ironbar&
Else
end if

If brick >= 1 Then
brick& = _LOADIMAGE("brick.png", 32)
print "  Brick            :" brick; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), brick&
print ""
_FREEIMAGE brick&
Else
end if

If paper >= 1 Then
paper& = _LOADIMAGE("paper.png", 32)
print "  Papier            :" paper; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), paper&
print ""
_FREEIMAGE paper&
Else
end if

            If skin >= 1 Then
skin& = _LOADIMAGE("skin.png", 32)
print "  Hide              :" skin; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), skin&
print ""
_FREEIMAGE skin&
Else
end if

If leather >= 1 Then
leather& = _LOADIMAGE("leather.png", 32)
print "  Leather          :" leather; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), leather&
print ""
_FREEIMAGE leather&
Else
end if

If fat >= 1 Then
fat& = _LOADIMAGE("fat.png", 32)
print "  Fat              :" fat; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), fat&
print ""
_FREEIMAGE fat&
Else
end if

If feather >= 1 Then
feather& = _LOADIMAGE("feather.png", 32)
print "  Feather          :" feather; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
    _PUTIMAGE (X, Y), feather&
print ""
_FREEIMAGE feather&
Else
end if

If boneglue >= 1 Then
boneglue& = _LOADIMAGE("boneglue.png", 32)
print "  Bone glue        :" boneglue; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), boneglue&
print ""
_FREEIMAGE boneglue&
Else
end if

If thread >= 1 Then
thread& = _LOADIMAGE("thread.png", 32)
print "  Thread            :" thread; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), thread&
print ""
_FREEIMAGE thread&
Else
end if

If wax >= 1 Then
wax& = _LOADIMAGE("wax.png", 32)
print "  Wax              :" wax; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), wax&
print ""
_FREEIMAGE wax&
Else
end if

If flux >= 1 Then
flux& = _LOADIMAGE("flux.png", 32)
print "  Flux              :" flux; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), flux&
print ""
_FREEIMAGE flux&
Else
end if

if snakevenom >= 1 Then
snakevenom& = _LOADIMAGE("snakevenom.png", 32)
print "  Snake venom      :" snakevenom; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), snakevenom&
print ""
_FREEIMAGE snakevenom&
Else
end if

if pearl >= 1 Then
pearl& = _LOADIMAGE("pearl.png", 32)
print "  Pearl            :" pearl; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), pearl&
print ""
_FREEIMAGE pearl&
Else
end if

if tar >= 1 Then
tar& = _LOADIMAGE("tar.png", 32)
print "  Tar              :" tar; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), tar&
print ""
_FREEIMAGE tar&
Else
end if
'herbes --------------------
If motherwort >= 1 Then
motherwort& = _LOADIMAGE("motherwort.png", 32)
print "  Mortherwort      :" motherwort; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), motherwort&
print ""
_FREEIMAGE motherwort&
Else
end if

If houseleek >= 1 Then
houseleek& = _LOADIMAGE("houseleek.png", 32)
print "  Houseleek        :" houseleek; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), houseleek&
print ""
_FREEIMAGE houseleek&
Else
end if

If stjohnwort >= 1 Then
stjohnwort& = _LOADIMAGE("stjohnwort.png", 32)
print "  St.John wort      :" stjohnwort; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), stjohnwort&
print ""
_FREEIMAGE stjohnwort&
Else
end if

If rosehip >= 1 Then
rosehip& = _LOADIMAGE("rosehip.png", 32)
print "  Rosehip          :" rosehip; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), rosehip&
print ""
_FREEIMAGE rosehip&
Else
end if

If borage >= 1 Then
borage& = _LOADIMAGE("borage.png", 32)
print "  Borage            :" borage; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), borage&
print ""
_FREEIMAGE borage&
Else
end if

If eucalyptus >= 1 Then
eucalyptus& = _LOADIMAGE("eucalyptus.png", 32)
print "  Eucalyptus        :" eucalyptus; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), eucalyptus&
print ""
_FREEIMAGE eucalyptus&
Else
end if

If cinquefoil >= 1 Then
cinquefoil& = _LOADIMAGE("cinquefoil.png", 32)
print "  Cinquefoil        :" cinquefoil; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), cinquefoil&
print ""
_FREEIMAGE cinquefoil&
Else
end if

If myrtle >= 1 Then
myrtle& = _LOADIMAGE("myrtle.png", 32)
print "  Myrtle            :" myrtle; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), myrtle&
print ""
_FREEIMAGE myrtle&
Else
end if

If euphrasia >= 1 Then
euphrasia& = _LOADIMAGE("euphrasia.png", 32)
print "  Euphrasia        :" euphrasia; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), euphrasia&
print ""
_FREEIMAGE euphrasia&
Else
end if

If groundivy >= 1 Then
groundivy& = _LOADIMAGE("groundivy.png", 32)
print "  Ground ivy        :" groundivy; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), groundivy&
print ""
_FREEIMAGE groundivy&
Else
end if

If marshmallow >= 1 Then
marshmallow& = _LOADIMAGE("marshmallow.png", 32)
print "  Marshmallow      :" marshmallow; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), marshmallow&
print ""
_FREEIMAGE marshmallow&
Else
end if

If sarsaparilla >= 1 Then
sarsaparilla& = _LOADIMAGE("sarsaparilla.png", 32)
print "  Sarsaparilla      :" sarsaparilla; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), sarsaparilla&
print ""
_FREEIMAGE sarsaparilla&
Else
end if

If walnut >= 1 Then
walnut& = _LOADIMAGE("walnut.png", 32)
print "  Walnut            :" walnut; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), walnut&
print ""
_FREEIMAGE walnut&
Else
end if

'can put 3 more before size is full




'Outils / Tools / Weapons ici ---------------------------------------------------------EQ
locate 28, 199
print " Tools : "
locate 29, 199 'afin que ca reste sur la meme colonne a droite


If stoneaxe.equipmentcount >= 1 Then
locate , 199 'afin que ca reste sur la meme colonne a droite
stoneaxecount& = _LOADIMAGE("stoneaxe.png", 32)
print "  Stone axe          :" stoneaxe.equipmentcount; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), stoneaxecount&
print ""
_FREEIMAGE stoneaxecount&
Else
end if

If copperaxe.equipmentcount >= 1 Then
locate , 199 'afin que ca reste sur la meme colonne a droite
copperaxecount& = _LOADIMAGE("copperaxe.png", 32)
print "  Copper axe          :" copperaxe.equipmentcount; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), copperaxecount&
print ""
_FREEIMAGE copperaxecount&
Else
end if

If ironaxe.equipmentcount >= 1 Then
locate , 199 'afin que ca reste sur la meme colonne a droite
ironaxecount& = _LOADIMAGE("ironaxe.png", 32)
print "  Iron axe            :" ironaxe.equipmentcount; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), ironaxecount&
print ""
_FREEIMAGE ironaxecount&
Else
end if

If copperpickaxe >= 1 Then
locate , 199 'afin que ca reste sur la meme colonne a droite
copperpickaxe& = _LOADIMAGE("copperpickaxe.png", 32)
print "  Copper pickaxe      :" copperpickaxe "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), copperpickaxe&
print ""
_FREEIMAGE copperpickaxe&
Else
end if

If ironpickaxe >= 1 Then
locate , 199 'afin que ca reste sur la meme colonne a droite
ironpickaxe& = _LOADIMAGE("ironpickaxe.png", 32)
print "  Iron pickaxe        :" ironpickaxe "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), ironpickaxe&
print ""
_FREEIMAGE ironpickaxe&
Else
end if

If woodshovel >= 1 Then
locate , 199 'afin que ca reste sur la meme colonne a droite
woodshovel& = _LOADIMAGE("woodshovel.png", 32)
print "  Wooden shovel      :" woodshovel "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), woodshovel&
print ""
_FREEIMAGE woodshovel&
Else
end if

If coppershovel >= 1 Then
locate , 199 'afin que ca reste sur la meme colonne a droite
coppershovel& = _LOADIMAGE("coppershovel.png", 32)
print "  Copper shovel      :" coppershovel "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), coppershovel&
print ""
_FREEIMAGE coppershovel&
Else
end if

If ironshovel >= 1 Then
locate , 199 'afin que ca reste sur la meme colonne a droite
ironshovel& = _LOADIMAGE("ironshovel.png", 32)
print "  Iron shovel        :" ironshovel "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), ironshovel&
print ""
_FREEIMAGE ironshovel&
Else
end if

If claybowl >= 1 Then
locate , 199
claybowl& = _LOADIMAGE("claybowl.png", 32)
print "  Clay pot            :" claybowl; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), claybowl&
print ""
_FREEIMAGE claybowl&
Else
end if

If glassbottle >= 1 Then
locate , 199
glassbottle& = _LOADIMAGE("glassbottle.png", 32)
print "  Glass bottle        :" glassbottle; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), glassbottle&
print ""
_FREEIMAGE glassbottle&
Else
end if

If mortarpestle >= 1 Then
locate , 199 'afin que ca reste sur la meme colonne a droite
mortarpestle& = _LOADIMAGE("mortarpestle.png", 32)
print "  Mortar and pestle  :" mortarpestle; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), mortarpestle&
print ""
_FREEIMAGE mortarpestle&
Else
end if

If rope >= 1 Then
locate , 199 'afin que ca reste sur la meme colonne a droite
rope& = _LOADIMAGE("rope.png", 32)
print "  Rope                :" rope; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), rope&
print ""
_FREEIMAGE rope&
Else
end if

If bucket >= 1 Then
locate , 199 'afin que ca reste sur la meme colonne a droite
bucket& = _LOADIMAGE("bucket.png", 32)
print "  Bucket              :" bucket; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), bucket&
print ""
_FREEIMAGE bucket&
Else
end if

If map >= 1 Then
locate , 199 'afin que ca reste sur la meme colonne a droite
map& = _LOADIMAGE("map.png", 32)
print "  Map of the island  :" map; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), map&
print ""
_FREEIMAGE map&
Else
end if

If drawingmats >= 1 Then
locate , 199 'afin que ca reste sur la meme colonne a droite
drawingmats& = _LOADIMAGE("drawingmats.png", 32)
print "  Drawing materials  :" drawingmats; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), drawingmats&
print ""
_FREEIMAGE drawingmats&
Else
end if

'equipement equipment armes Armors weapon --------------------------------------
locate 28, 166
print "Equipment : "
locate 29, 166

If bonespear.equipmentcount >= 1 Then
locate , 166
bonespearcount& = _LOADIMAGE("bonespear.png", 32)
print "  Bone spear        :" bonespear.equipmentcount; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), bonespearcount&
print ""
_FREEIMAGE bonespearcount&
Else
end if


If flintspear.equipmentcount >= 1 Then
locate , 166 'afin que ca reste sur la meme colonne a droite
flintspearcount& = _LOADIMAGE("flintspear.png", 32)
print "  Flint spear      :" flintspear.equipmentcount; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), flintspearcount&
print ""
_FREEIMAGE flintspearcount&
Else
end if

If copperspear.equipmentcount >= 1 Then
locate , 166 'afin que ca reste sur la meme colonne a droite
copperspearcount& = _LOADIMAGE("copperspear.png", 32)
print "  Copper spear      :" copperspear.equipmentcount; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), copperspearcount&
print ""
_FREEIMAGE copperspearcount&
Else
end if

If ironspear.equipmentcount >= 1 Then
locate , 166 'afin que ca reste sur la meme colonne a droite
ironspearcount& = _LOADIMAGE("ironspear.png", 32)
print "  Iron spear        :" ironspear.equipmentcount; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), ironspearcount&
print ""
_FREEIMAGE ironspearcount&
Else
end if

If skingloves.equipmentcount >= 1 Then
locate , 166
skingloves& = _LOADIMAGE("skingloves.png", 32)
print "  Hide gloves      :" skingloves.equipmentcount; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), skingloves&
print ""
_FREEIMAGE skingloves&
Else
end if

If skinhelmet.equipmentcount >= 1 Then
locate , 166
skinhelmet& = _LOADIMAGE("skinhelmet.png", 32)
print "  Hide helmet      :" skinhelmet.equipmentcount; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), skinhelmet&
print ""
_FREEIMAGE skinhelmet&
Else
end if

If skinshoes.equipmentcount >= 1 Then
locate , 166
skinshoes& = _LOADIMAGE("skinshoes.png", 32)
print "  Hide shoes        :" skinshoes.equipmentcount; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), skinshoes&
print ""
_FREEIMAGE skinshoes&
Else
end if

If skinarmor.equipmentcount >= 1 Then
locate , 166
skinarmor& = _LOADIMAGE("skinarmor.png", 32)
print "  Hide armor        :" skinarmor.equipmentcount; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), skinarmor&
print ""
_FREEIMAGE skinarmor&
Else
end if

If leathergloves.equipmentcount >= 1 Then
locate , 166
leathergloves& = _LOADIMAGE("leathergloves.png", 32)
print "  Leather gloves    :" leathergloves.equipmentcount; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), leathergloves&
print ""
_FREEIMAGE leathergloves&
Else
end if

If leatherhelmet.equipmentcount >= 1 Then
locate , 166
leatherhelmet& = _LOADIMAGE("leatherhelmet.png", 32)
print "  Leather helmet    :" leatherhelmet.equipmentcount; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), leatherhelmet&
print ""
_FREEIMAGE leatherhelmet&
Else
end if

If leathershoes.equipmentcount >= 1 Then
locate , 166
leathershoes& = _LOADIMAGE("leathershoes.png", 32)
print "  Leather shoes    :" leathershoes.equipmentcount; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), leathershoes&
print ""
_FREEIMAGE leathershoes&
Else
end if

If leatherarmor.equipmentcount >= 1 Then
locate , 166
leatherarmor& = _LOADIMAGE("leatherarmor.png", 32)
print "  Leather armor    :" leatherarmor.equipmentcount; "";
X = (POS(0) - 1) * _FONTWIDTH
Y = (CSRLIN - 1) * _FONTHEIGHT
_PUTIMAGE (X, Y), leatherarmor&
print ""
_FREEIMAGE leatherarmor&
Else
end if

'fin d'inventaire
'affichage image sur la droite
if (hour >= 8) AND (hour < 19) Then
plagetest& = _LOADIMAGE("start1.png", 32)
_PUTIMAGE (1325, 1), plagetest&
_FREEIMAGE plagetest&
elseif (hour >= 19) AND (hour < 24) then
plagetest& = _LOADIMAGE("start2.png", 32)
_PUTIMAGE (1325, 1), plagetest&
_FREEIMAGE plagetest&
elseif hour >= 0 then
plagetest& = _LOADIMAGE("start3.png", 32)
_PUTIMAGE (1325, 1), plagetest&
_FREEIMAGE plagetest&
end if

'affichage separation
separation& = _LOADIMAGE("separation.png", 32)
_PUTIMAGE (256, 306), separation&
_FREEIMAGE separation&


'constructions sur ecran principal
locate 20, 38 '------------------------------------
print "  Buildings :"
if shelter = 1 then
locate 21, 38
print "  Shelter              ";
Color Green : print "(+35 energy when resting)"
color White
else
end if

if brickshelter = 1 then
locate 21, 38 'a la place de l'abri de base
print "  Brick shelter        ";
Color Green : print "(+45 energy when resting)"
color White
else
end if

if bed = 1 then
locate , 38
Print "  Bed                  ";
color Green : print "(+5 energy when resting)"
color White
else
end if

if watercollector = 1 then
locate , 38
Print "  Water collector      ";
color RoyalBlue : print "(+10 water everyday)"
color White
else
end if

if firering = 1 then
locate , 38
Print "  Campfire              ";
color LightSalmon : print "(More warmth when making a fire)"
color White
else
end if

if paperpress = 1 then
locate , 38
Print "  Paper presss          ";
color White : print "(Used to craft paper)"
color White
else
end if

if clayworkshop = 1 then
locate , 38
Print "  Clay workshop        ";
color Wheat : print "(Used to craft clay items)"
color White
else
end if

if basicforge = 1 then
locate , 38
Print "  Basic forge          ";
color White : print "(Used to smelt ore and forge metal tools)"
color White
else
end if

if cauldron = 1 then
locate , 38
print "  Cauldron              ";
Color PaleGreen : print "(Used to boil things)"
color White
else
end if

if fireplace = 1 then
locate , 38
print "  Fireplace            ";
Color DarkOrange : print "(+10 warmth everyday)"
color White
else
end if

if tanningtub = 1 then
locate , 38
print "  Tanning tub          ";
Color SaddleBrown : print "(Used to tan leather)"
color White
else
end if

if tarkiln = 1 then
locate , 38
print "  Tar kiln              ";
Color DimGray : print "(Used to make tar)"
color White
else
end if

        locate 2 'locate 44
      PRINT " What would you like to do ?"
print ""
      FOR i = 1 TO 24 STEP 3
PRINT i; mainaction(i), i + 1; mainaction(i + 1), i + 2; mainaction(i + 2)
        NEXT i
      PRINT ""
      INPUT "Enter the number of your choice : "; choice
WEND ' End of main loop


Reply
#13
The first thing I notice that needs commenting on is you have multiple memory leaks in the game.  Run it and play it long enough, and your computer will self-destruct and send all the nuclear launch codes to North Korea!

Code: (Select All)
        Case 1 'Eat food
            If food >= 10 Then
                eat& = _SndOpen("eat.mp3")
                _SndPlay eat&
For example, let's take a look at what happens when we try to eat food, as above ^.   If your food >=10, then you open the sound file ("eat.mp3") and assign it to the handle eat&, and then you play the sound of eatting...  So if you eat once, you open that file and have it in memory once.  Eat a second time, you now have a second copy of that file in memory.  Eat 50 times, and you now have 50 copies of "eat.mp3" in memory!!

If you're going to use a _SNDOPEN in a loop, you have to remember to have a _SNDCLOSE when you're finished with that sound.

My advice, to keep it simple??

Just move all those resource loading commands to the very start of the program, leave them in memory, and then call them as needed without concern.  Keep in mind that you can play a sound handle as many times as you want -- you just don't want to OPEN it more than once, without also CLOSING it when you're finished with it first.

eat& = _SndOpen("eat.mp3")
FOR i = 1 to 10
   _SNDPLAY eat&
   _Delay 1
NEXT


For instance, the above would load the file once, and then play that sound 10 times in a row, with a 1 second delay between playing.   No memory leak there, nor issue with anything -- it'll work perfectly fine.


FOR i = 1 to 10
    eat& = _SndOpen("eat.mp3")
   _SNDPLAY eat&
   _Delay 1
NEXT

Compared to the version above which now loads 10 copies into memory, causing a memory leak and app usage to climb constantly as it runs through the loop.  The only way the 2nd version above would be workable would be like so:

FOR i = 1 to 10
    eat& = _SndOpen("eat.mp3")
   _SNDPLAY eat&
   _SndClose eat&  'close it after you use it, and before you open it again!
   _Delay 1
NEXT
Reply
#14
Thank you for your insight! 

For some reason I thought I didn't need to free the memory like for images.

It's an easy fix and I will get to it to prevent memory leaks Big Grin
Reply
#15
(04-19-2024, 10:21 PM)Delsus Wrote: Thank you for your insight! 

For some reason I thought I didn't need to free the memory like for images.

It's an easy fix and I will get to it to prevent memory leaks Big Grin

You can also use _SNDPLAYFILE which automatically loads, plays and then closes the sound for you. This is usually ok. However, if I were to play some sounds often (say an explosion sound in a shooter game), then I'd rather pre-load the sound and keep the sound handle throughout the lifetime of the program. This is purely for performance reasons.
Reply
#16
Hi,you can replace (salut, tu peux remplacer):

Code: (Select All)
locate 32,95 
print "    Votre monocoque a été frappé par la foudre."
locate 32,95
print "    Votre monocoque a été frappé par la foudre. "
_Delay 1
locate 32,95
print "    Votre monocoque a été frappé par la foudre.."
_Delay 1
locate 32,95
print "    Votre monocoque a été frappé par la foudre..."
_Delay 1
'debut du fondu
Color LightGray
locate 32,95
print "    Votre monocoque a été frappé par la foudre..."
_Delay .4
Color DarkGray
locate 32,95
print "    Votre monocoque a été frappé par la foudre..."
_Delay .4
Color DimGray
locate 32,95
print "    Votre monocoque a été frappé par la foudre..."
_Delay .4
Color Black
locate 32,95
print "    Votre monocoque a été frappé par la foudre..."

by something like that (par qqchose de ce style):

Code: (Select All)
Color _RGB(255, 255, 255)
For n = 0 To 3
    Locate 32, 95
    Print "    Votre monocoque a été frappé par la foudre" + Left$("...", n)
    _Delay 1
Next n
For n = 0 To 3
    Color _RGB(255 - 64 * n, 255 - 64 * n, 255 - 64 * n)
    Locate 32, 95
    Print "    Votre monocoque a été frappé par la foudre..."
    _Delay 1
Next n

it will reduce lot of lines... ! (ça réduirait considérablement le nombre de lignes de ton code !)

Eugesippe
Reply
#17
Hello Eugesippe!

Thank you for the tip! I will try it out soon!
Reply
#18
(05-11-2024, 06:40 AM)Delsus Wrote: Hello Eugesippe!

Thank you for the tip! I will try it out soon!
I find something shorter: 1 line less ! (j'ai trouvé qqchose de plus court: 1 ligne en moins !)

Code: (Select All)
Color _RGB(255, 255, 255)
For n = 0 To 7
    Locate 32, 95
    If n < 4 Then
        Print " Votre monocoque a été frappé par la foudre" + Left$("...", n)
    Else
        Color _RGB(255 - 64 * (n - 3), 255 - 64 * (n - 3), 255 - 64 * (n - 3))
        Print " Votre monocoque a été frappé par la foudre..."
    End If
    _Delay 1
Next n
Reply




Users browsing this thread: 1 Guest(s)