VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



This is a multi-player fighting game between two human players.

by Harn (8 Submissions)
Category: Games
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Fri 21st November 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

This is a multi-player fighting game between two human players.

Rate This is a multi-player fighting game between two human players.



Dim f As Integer
Dim pts2 As Integer
Dim pts1 As Integer
Dim p1 As Integer
Dim p2 As Integer
Dim d As Integer

Private Sub Command1_Click()
pts1 = pts1 - 1
Text1.Text = pts1
d = Int(Rnd * 6) + 1
If d = 5 Or 6 Then
p2 = p2 + Int(Rnd * 4) + 1
If p2 >= 30 Then
MsgBox "P2 loses!"
If pts1 < 0 Then
MsgBox "Press done!"
MsgBox "You may not attak next turn"
Else
End If
End If
End If

End Sub

Private Sub Command2_Click()
If pts1 >= 2 Then
f = Int(Rnd * 4) + 1
If f = 3 Or 4 Then
p2 = p2 + Int(Rnd * 4) + 1
If p2 >= 30 Then
MsgBox "P2 loses"
Else
MsgBox "You don't have enough attak pts"
End If
End If
End If
End Sub

Private Sub Command3_Click()
pts1 = 4
MsgBox "player 2 turn"
End Sub

Private Sub Command4_Click()
pts2 = pts2 - 1
Text2.Text = pts2
d = Int(Rnd * 6) + 1
If d = 5 Or 6 Then
p1 = p1 + Int(Rnd * 4) + 1
If p1 >= 30 Then
Text4.Text = p2
MsgBox "P1 loses!"
Else
If pts2 < 0 Then
MsgBox "Press done!"
MsgBox "You may not attak next turn!"
Else
End If
End If
End If
End Sub

Private Sub Command6_Click()
pts2 = 4
MsgBox "player 1 turn"
End Sub

Private Sub Command7_Click()
MsgBox "Player2 turn!"
pts1 = 2
End Sub

Private Sub Command8_Click()
MsgBox "Player1 turn!"
pts2 = 2
End Sub

Private Sub Form_Load()
MsgBox "Here are the rules!"
MsgBox "You get to attak according to how much attack pts your player has, when you run out of attack pts that turn you press Done and the other player gets toy go with there attacks"
MsgBox "There are 2 different attacks, the kick, and the punch(punch cost 1pt, kick cost 2 pts)"
a = Int(Rnd * 4) + 1
If a = 1 Or 2 Then
MsgBox "Player 1 gets to go first"
Else
MsgBox "Player 2 gets to go first"
End If
End Sub

Download this snippet    Add to My Saved Code

This is a multi-player fighting game between two human players. Comments

No comments have been posted about This is a multi-player fighting game between two human players.. Why not be the first to post a comment about This is a multi-player fighting game between two human players..

Post your comment

Subject:
Message:
0/1000 characters