zombie dice : spel idee

Vragen en suggesties over het programmeren van spelletjes, sprites en dergelijke in Liberty BASIC

Moderator: anthonio

zombie dice : spel idee

Berichtdoor bluatigro » wo feb 19, 2014 2:58 pm

hier n idee voor n spelletje : zombie dice

regels :

1.On your turn grab 3 dice from the cup and roll them.
Dice are colored red, yellow, and green
and have footsteps, brains, or shotgun icons.
2.Set aside any brain and shotgun dice.
3.If you have 3 shotguns
, your turn ends with a score of 0.
4.You can decide to either
stop rolling or roll again.
5.If you stop, your score
for this turn is the number of brains you have.
6.If you re-roll,
keep the footsteps dice you rolled,
set aside the brain and shotgun dice rolled,
and randomly grab dice to replace the brain
and shotgun dice. Roll the 3 dice.
7.Go back to step 4.
You basically can keep re-rolling
for as long as you want to push your luck.
To win:

•Once a player gets 13 brains, finish the round. If there is a tie, the tied players play a single tie breaker round.
•Also, if you run out of dice for your turn,
note the number of brain dice you’ve rolled
and place those brain dice back into the cup.
Then continue as normal.
The colors note your odds of winning.
The entire dice set has 6 green, 4 yellow,
and 3 red dice

green dice : 3 brains 2 foodsteps 1 shotgun
yellow dice : 2 brains 2 foodsteps 2 shotgun
red dice : 1 brain 2 foodsteps 3 shotgun
bluatigro
 
Berichten: 306
Geregistreerd: za sep 27, 2008 6:01 pm

Re: zombie dice : spel idee

Berichtdoor bluatigro » do feb 20, 2014 11:23 am

eerste poging tot zombie dice
Code: Selecteer alles
dim dice$( 13 ) , last( 13 ) , ry( 13 )
''prompt "how many players ?" ; max$
global max , false , true
true = not( false )
max = 2 ''val( max$ )
dim brain( max ) , gun( max ) , dead( max ) , won( max )
dim hand$( 3 )
for i = 1 to 6
  dice$( i ) = "brain brain brain " _
  + "step step gun"
next i
for i = 7 to 10
  dice$( i ) = "brain brain step " _
  + "step gun gun"
next i
for i = 11 to 13
  dice$( i ) = "brain steps steps" _
  + "gun gun gun"
next
[startgame]
  for i = 1 to max
    brain( i ) = 0
    gun( i ) = 0
  next i
  ''take 3 dice
[playrond]
  for player = 1 to max
[nextplay]
    if not( dead( player ) ) _
    or not( won( player ) )then
      for i = 1 to 13
        d = int( rnd( 0 ) * 13 + 1 )
        h$ = dice$( d )
        dice$( d ) = dice$( i )
        dice$( i ) = h$
      next i
      for i = 1 to 3
        d = int( rnd( 0 ) * 3 + 1 )
        hand$( i ) = word$( dice$( i ) , d )
      next i
      for i = 1 to 3
        if hand$( i ) = "gun" then
          gun( player ) = gun( player ) + 1
        end if
        if hand$( i ) = "brain" then
          brain( player ) = brain( player ) + 1
        end if
      next i
      fl = false
      if brain( player ) >= 13 then
        notice "player " ; player ; chr$( 13 ) _
        + "has 13 or more brais and has won ."
        won( player ) = true
        fl = true
      end if
      if gun( player ) >= 3 then
        notice "player : " ; player ; chr$( 13 ) _
        + "has 3 or more shots and is dead ."
        dead( player ) = true
        fl = true
      end if
      if not( fl ) then
        notice "player " + str$(player) + chr$( 13 ) _
        + "trows :" + chr$( 13 ) _
        + hand$( 1 ) + " " + hand$( 2 ) _
        + " " + hand$( 3 ) + chr$( 13 ) _
        + "and has total :" + chr$( 13 ) _
        + "brains : " + str$(brain( player )) + chr$( 13 ) _
        + "shots : " + str$(gun( player )) + " ."
      end if
      confirm "Try more luck ?" ; yn$
      if yn$ = "yes" then goto [nextplay]
    end if
  next player
  somewinner = false
  for player = 1 to max
    if won( player ) then somewinner = true
  next player
  if not( somewinner ) then goto [playrond]
  hscore = 0
  winner = 0
  for player = 1 to max
    if brain( player ) > hscore then
      winner = player
    end if
  next player
  notice chr$( 13 ) _
  + "player " + str$( winner ) + " has won ."
end
bluatigro
 
Berichten: 306
Geregistreerd: za sep 27, 2008 6:01 pm


Keer terug naar Games

Wie is er online

Gebruikers op dit forum: Geen geregistreerde gebruikers. en 1 gast

cron