 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Rhys
Joined: 17 Apr 2007 Posts: 730 Location: Florida
|
Posted: Mon Apr 21, 2008 5:39 pm Post subject: [Alpha] AHK RPG |
|
|
20080422 Alpha 3:
Working:
Combat
-Different types of swings
-Critical hits
-Chance to miss
-Running away
Note: The generic enemy is probably much stronger than you are in Alpha 3.
Not Working:
Combat
-Armor
-Chance to Evade
Everything else...
| Code: | #SingleInstance, Force
#NoEnv
Version=alpha 3
/*
alpha 3
Added misses and different attacks
Added Exit and Enter Combat sub
Added 'Non Combat' actions
Pick A Fight
Added 'I'm Dead' actions
Revive
alpha 2
Minor GUI update
Added version # to Title
Added animateion to HP bars on reset
Fixed results text
Added HealMe button and sub (for testing)
Added ability to run away (50% success guaranteed crit on failure)
alpha 1
Initial Release
*/
;Your Stats
My_HP:=100
My_Crit:=25 ;Unused after Alpha 3
My_Armor:=5 ;Unused
;Enemy Stats
His_HP:=100
His_Crit:=20
His_Armor:=5 ;Unused
Gui,Add,Text,w100 +Center +Section,You:
Gui,Add,Progress, w100 vMy_HP cRed BackgroundBlack,%My_HP%
Gui,Add,Text,w100 +Center ys x+5,Enemy:
Gui,Add,Progress,w100 vHis_HP cRed BackgroundBlack +Hidden,%His_HP%
Gui,Add,Edit,xs w205 r5 vCombatLog +ReadOnly
;Combat Actions
;Gui,Add,Button,+Section gButtonAttack vButtonAttack +Hidden,Attack
Gui,Add,Button,+Section gButtonAttackStrong vButtonAttackStrong +Hidden,Strong
Gui,Add,Button,yp x+5 gButtonAttackMed vButtonAttackMed +Hidden,Medium
Gui,Add,Button,yp x+5 gButtonAttackLight vButtonAttackLight +Hidden,Light
Gui,Add,Button,yp x+5 gButtonRun vButtonRun +Hidden,Run
;Non-Combat Actions
Gui,Add,Button,xs ys gButtonPickAFight vButtonPickAFight,Pick A Fight
;I'm Dead Actions
Gui,Add,Button,xs ys gButtonRevive vButtonRevive +Hidden,Revive!
;Debug/testing junk
Gui,Add,Text,xs,Debug/Test Junk:
Gui,Add,Button,gReset,Reset
Gui,Add,Button,gHealMe yp x+5,HealMe
Gui,Color,White
Gui,Show,,AHK RPG [%Version%]
Return
ButtonRun:
Gui,+Disabled
If ((His_HP * My_HP) < 0) ;If someone is dead...
{ GoSub,Results
Return
}
RunningAway:=1
Random,GotAway,0,1
CombatLog:="You try to run...`n" . CombatLog
GuiControl,,CombatLog,%CombatLog%
Sleep,500
If !(GotAway)
{ CombatLog:="You are struck from behind!`n" . CombatLog
GuiControl,,CombatLog,%CombatLog%
Sleep,500
GoSub,Defend
If (My_HP <= 0)
{ GoSub,Results
Return
}
}
Else
{ CombatLog:="You escaped!`n" . CombatLog
GuiControl,,CombatLog,%CombatLog%
GoSub,EndCombat
Gui,-Disabled
}
Return
ButtonAttackStrong:
My_Crit:=10
My_Hit:=50
My_DmgMin:=5
My_DmgMax:=10
GoSub,ButtonAttack
Return
ButtonAttackMed:
My_Crit:=20
My_Hit:=70
My_DmgMin:=3
My_DmgMax:=7
GoSub,ButtonAttack
Return
ButtonAttackLight:
My_Crit:=50
My_Hit:=90
My_DmgMin:=1
My_DmgMax:=5
GoSub,ButtonAttack
Return
ButtonAttack:
Gui,+Disabled
If ((His_HP * My_HP) =< 0) ;If someone is dead...
{ GoSub,Results
Return
}
GoSub,Attack
If (His_HP <= 0)
{ GoSub,Results
Return
}
Sleep,750
GoSub,Defend
If (My_HP <= 0)
{ GoSub,Results
Return
}
Gui,-Disabled
Return
Attack:
Crit:=0
Action=hit
Random,Hit,1,100
If (Hit > My_Hit)
{
CombatLog:="You miss!`n" . CombatLog
GuiControl,,CombatLog,%CombatLog%
Return
}
Else
{
Random,Dmg,%MY_DmgMin%,%My_DmgMax%
Random,Crit_Roll,1,100
If (My_Crit >= Crit_Roll)
{ Crit:=1
action=crit
}
Dmg2:=Dmg + (Dmg * Crit)
CombatLog:="You " . action . " him for " . Dmg2 . ".`n" . CombatLog
His_HP-=Dmg2
GuiControl,,His_HP,%His_HP%
GuiControl,,CombatLog,%CombatLog%
Return
}
Return
Reset:
Gui,+Disabled
;My_HP:=100
;His_HP:=100
Loop,
{
If (My_HP != 100)
{
My_HP++
GuiControl,,My_HP,%My_HP%
}
If (His_HP != 100)
{
His_HP++
GuiControl,,His_HP,%His_HP%
}
If (My_Hp = 100) && (His_HP = 100)
Break
Sleep,10
}
GuiControl,Enable,Go
CombatLog:="Combat reset.`n" . CombatLog
GuiControl,,CombatLog,%CombatLog%
Gui,-Disabled
Return
Defend:
Crit:=0
Action=hit
Random,Dmg,1,10
Random,Crit_Roll,1,100
If ((His_Crit >= Crit_Roll) || (RunningAway))
{ Crit:=1
action=crit
}
Dmg2:=Dmg + (Dmg * Crit)
CombatLog:="You were " . action . " for " . Dmg2 . ".`n" . CombatLog
My_HP-=Dmg2
GuiControl,,My_HP,%My_HP%
GuiControl,,CombatLog,%CombatLog%
Gui,-Disabled
Return
Results:
CombatLog:="Fight Over!`nYou: " . My_HP . "HP`nHim: " . His_HP . "HP.`n" . CombatLog
GuiControl,,CombatLog,%CombatLog%
GoSub,EndCombat
Gui,-Disabled
Return
HealMe:
Gui,+Disabled
Loop,
{
If (My_HP != 100)
{
My_HP++
GuiControl,,My_HP,%My_HP%
}
Else
Break
Sleep,10
}
CombatLog:="You were healed!`n" . CombatLog
GuiControl,,CombatLog,%CombatLog%
Gui,-Disabled
Return
EndCombat:
GuiControl,Hide,ButtonRevive
;Guicontrol,Hide,ButtonAttack
Guicontrol,Hide,ButtonAttackStrong
Guicontrol,Hide,ButtonAttackMed
Guicontrol,Hide,ButtonAttackLight
Guicontrol,Hide,ButtonRun
GuiControl,Hide,His_HP
If (My_HP > 0)
{ GuiControl,Show,ButtonPickAFight
GuiControl,Focus,ButtonPickAFight
}
Else
{ GuiControl,Show,ButtonRevive
GuiControl,Focus,ButtonRevive
CombatLog:="You are dead! Bummer.`n" . CombatLog
GuiControl,,CombatLog,%CombatLog%
}
Return
ButtonRevive:
My_HP=100
GuiControl,,My_HP,%My_HP%
CombatLog:="You've come back from the dead! Groovy.`n" . CombatLog
GuiControl,,CombatLog,%CombatLog%
GoSub,EndCombat
Return
EnterCombat:
His_HP=100
GuiControl,,His_HP,%His_HP%
;Guicontrol,Show,ButtonAttack
Guicontrol,Show,ButtonAttackStrong
Guicontrol,Show,ButtonAttackMed
Guicontrol,Show,ButtonAttackLight
Guicontrol,Show,ButtonRun
GuiControl,Show,His_HP
GuiControl,Hide,ButtonPickAFight
GuiControl,Focus,ButtonAttackStrong
Return
ButtonPickAFight:
CombatLog:="You picked a fight with a generic enemy!`n" . CombatLog
GuiControl,,CombatLog,%CombatLog%
GoSub, EnterCombat
Return
GuiClose:
ExitApp |
20080421 Alpha 2:
Working:
Rudimentary combat system
-Critical hits
-Running away
Not Working:
Combat
-Armor
-Chance to Miss
-Chance to Evade
Everything else...
| Code: | #SingleInstance, Force
#NoEnv
Version=alpha 2
/*
alpha 2
Minor GUI update
Added version # to Title
Added animateion to HP bars on reset
Fixed results text
Added HealMe button and sub (for testing)
Added ability to run away (50% success guaranteed crit on failure)
alpha 1
Initial Release
*/
;Your Stats
My_HP:=100
My_Crit:=25
My_Armor:=5 ;Unused
;Enemy Stats
His_HP:=100
His_Crit:=25
His_Armor:=5 ;Unused
Gui,Add,Text,w100 +Center +Section,You:
Gui,Add,Progress, w100 vMy_HP cRed BackgroundBlack,%My_HP%
Gui,Add,Text,w100 +Center ys x+5,Enemy:
Gui,Add,Progress,w100 vHis_HP cRed BackgroundBlack,%His_HP%
Gui,Add,Edit,xs w205 r5 vCombatLog +ReadOnly
;Combat Actions
Gui,Add,Button,gButtonAttack,Attack
Gui,Add,Button,yp x+5 gButtonRun,Run
;Debug/testing junk
Gui,Add,Text,xs,Debug/Test Junk:
Gui,Add,Button,gReset,Reset
Gui,Add,Button,gHealMe yp x+5,HealMe
Gui,Color,White
Gui,Show,,AHK RPG [%Version%]
Return
ButtonRun:
Gui,+Disabled
If ((His_HP * My_HP) =< 0) ;If someone is dead...
{ GoSub,Results
Return
}
RunningAway:=1
Random,GotAway,0,1
CombatLog:="You try to run...`n" . CombatLog
GuiControl,,CombatLog,%CombatLog%
Sleep,500
If !(GotAway)
{ CombatLog:="You are struck from behind!`n" . CombatLog
GuiControl,,CombatLog,%CombatLog%
Sleep,500
GoSub,Defend
If (My_HP <= 0)
{ GoSub,Results
Return
}
}
Else
{ CombatLog:="You escaped!`n" . CombatLog
GuiControl,,CombatLog,%CombatLog%
Gui,-Disabled
}
Return
ButtonAttack:
Gui,+Disabled
If ((His_HP * My_HP) < 0) ;If someone is dead...
{ GoSub,Results
Return
}
GoSub,Attack
If (His_HP <= 0)
{ GoSub,Results
Return
}
Sleep,750
GoSub,Defend
If (My_HP <= 0)
{ GoSub,Results
Return
}
Gui,-Disabled
Return
Attack:
Crit:=0
Action=hit
Random,Dmg,5,10
Random,Crit_Roll,1,100
If (My_Crit >= Crit_Roll)
{ Crit:=1
action=crit
}
Dmg2:=Dmg + (Dmg * Crit)
CombatLog:="You " . action . " him for " . Dmg2 . ".`n" . CombatLog
His_HP-=Dmg2
GuiControl,,His_HP,%His_HP%
GuiControl,,CombatLog,%CombatLog%
Return
Reset:
Gui,+Disabled
;My_HP:=100
;His_HP:=100
Loop,
{
If (My_HP != 100)
{
My_HP++
GuiControl,,My_HP,%My_HP%
}
If (His_HP != 100)
{
His_HP++
GuiControl,,His_HP,%His_HP%
}
If (My_Hp = 100) && (His_HP = 100)
Break
Sleep,10
}
GuiControl,Enable,Go
CombatLog:="Combat reset.`n" . CombatLog
GuiControl,,CombatLog,%CombatLog%
Gui,-Disabled
Return
Defend:
Crit:=0
Action=hit
Random,Dmg,4,10
Random,Crit_Roll,1,100
If ((His_Crit >= Crit_Roll) || (RunningAway))
{ Crit:=1
action=crit
}
Dmg2:=Dmg + (Dmg * Crit)
CombatLog:="You were " . action . " for " . Dmg2 . ".`n" . CombatLog
My_HP-=Dmg2
GuiControl,,My_HP,%My_HP%
GuiControl,,CombatLog,%CombatLog%
Gui,-Disabled
Return
Results:
CombatLog:="Fight Over!`nYou: " . My_HP . "HP`nHim: " . His_HP . "HP.`n" . CombatLog
GuiControl,,CombatLog,%CombatLog%
Gui,-Disabled
Return
HealMe:
Gui,+Disabled
Loop,
{
If (My_HP != 100)
{
My_HP++
GuiControl,,My_HP,%My_HP%
}
Else
Break
Sleep,10
}
CombatLog:="You were healed!`n" . CombatLog
GuiControl,,CombatLog,%CombatLog%
Gui,-Disabled
Return
GuiClose:
ExitApp |
20080421 Alpha 1:
Working:
Rudimentary combat system
Critical hits
Not Working:
Armor
Everything else...
| Code: | #SingleInstance, Force
#NoEnv
;Your Stats
My_HP:=100
My_Crit:=25
My_Armor:=5 ;Unused
;Enemy Stats
His_HP:=100
His_Crit:=25
His_Armor:=5 ;Unused
Gui,Add,Text,,You:
Gui,Add,Progress,vMy_HP cRed BackgroundBlack,%My_HP%
Gui,Add,Text,,Him:
Gui,Add,Progress,vHis_HP cRed BackgroundBlack,%His_HP%
Gui,Add,Button,gGo,Go
Gui,Add,Button,gReset yp x+5,Reset
Gui,Add,Text, y5 x140,Status:
Gui,Add,Edit,r5 vCombatLog +ReadOnly
Gui,Show,,AHK RPG
Return
Go:
Guicontrol,Disable,Go
GoSub,Attack
If (His_HP <= 0)
{ GoSub,Results
Return
}
Sleep,500
GoSub,Defend
If (My_HP <= 0)
{ GoSub,Results
Return
}
Guicontrol,Enable,Go
Return
Attack:
Crit:=0
Action=hit
Random,Dmg,5,10
Random,Crit_Roll,1,100
If (My_Crit >= Crit_Roll)
{ Crit:=1
action=crit
}
Dmg2:=Dmg + (Dmg * Crit)
CombatLog:="You " . action . " him for " . Dmg2 . ".`n" . CombatLog
His_HP-=Dmg2
GuiControl,,His_HP,%His_HP%
GuiControl,,CombatLog,%CombatLog%
Return
Reset:
My_HP:=100
His_HP:=100
GuiControl,,My_HP,%My_HP%
GuiControl,,His_HP,%His_HP%
GuiControl,Enable,Go
CombatLog:="Combat reset.`n" . CombatLog
GuiControl,,CombatLog,%CombatLog%
Return
Defend:
Crit:=0
Action=hit
Random,Dmg,4,10
Random,Crit_Roll,1,100
If (His_Crit >= Crit_Roll)
{ Crit:=1
action=crit
}
Dmg2:=Dmg + (Dmg * Crit)
CombatLog:="You were " . action . " for " . Dmg2 . ".`n" . CombatLog
My_HP-=Dmg2
GuiControl,,My_HP,%My_HP%
GuiControl,,CombatLog,%CombatLog%
Return
Results:
Guicontrol,Disable,Go
CombatLog:="Fight Over!`nYou: " . My_HP . "HP - Him: " . His_HP . ".`n" . CombatLog
GuiControl,,CombatLog,%CombatLog%
Return
GuiClose:
ExitApp |
_________________ [Join IRC!]

Last edited by Rhys on Tue Apr 22, 2008 9:28 pm; edited 1 time in total |
|
| Back to top |
|
 |
Fry
Joined: 01 Nov 2007 Posts: 627
|
Posted: Mon Apr 21, 2008 10:28 pm Post subject: |
|
|
Dude this is pretty cool!
Once you fix the other things maybe you should get money if you defeat an oppenent and you can buy better weapons,armor,maybe even some potion type things _________________ check out my site
www.eliteknifesquad.com |
|
| Back to top |
|
 |
SomeGuy
Joined: 21 Apr 2008 Posts: 96 Location: somewhere
|
Posted: Tue Apr 22, 2008 2:32 am Post subject: |
|
|
i replaced both of these:
with this
and it seems a little better...  |
|
| Back to top |
|
 |
Rhys
Joined: 17 Apr 2007 Posts: 730 Location: Florida
|
Posted: Tue Apr 22, 2008 3:09 am Post subject: |
|
|
@Fry: Money is going in for sure, as well as upgraded items, potions (maybe), etc. That's a little while off, though. I want to get the combat formulas roughed out first.
@SomeGuy: Eventually, damage will be calculated by more than a static min and max - Rather, min and max will not be based upon other stats like strength and agility, as well as the quality of your weapon and maybe the type of attack and perhaps your skill level with that class of weapon. 0-10 felt artificial to me, since I didn't like seeing that I crit for 2  _________________ [Join IRC!]
 |
|
| Back to top |
|
 |
imapow
Joined: 13 Mar 2008 Posts: 162 Location: Trøndelag, Norway
|
Posted: Tue Apr 22, 2008 6:28 am Post subject: |
|
|
if you make it multiplater you wold have a nice MOD,
but the game itslef gets boring ater 5min.
nice idea thanks. _________________ -._.-¨¯¨-._.-IM@PΩW-._.-¨¯¨-._.- |
|
| Back to top |
|
 |
Guest
|
Posted: Tue Apr 22, 2008 7:19 am Post subject: |
|
|
| imapow wrote: | | ...but the game itslef gets boring ater 5min. |
...actually I'm already bored & I haven't even played it...I'm sorry, but I've never understood the "fun" in playing a text based "rpg"...no offense to Rhys, but I've seen this type of "game" before & I just don't get it..."text based games" really have no point in my mind..."You are walking down a hall"..."You hit a wall"..."You turned left"..."You were slashed by a zombie"...all that is text based on random bullshit (not Rhys script, I mean some old game I played for less than 5 mins), so no offense Rhys, but I don't see the point in any text based game...now if you use DllCall into OpenGL & show me a 3D Hall & a 3D zombie...it might be fun... |
|
| Back to top |
|
 |
AZA
Joined: 10 Mar 2008 Posts: 159 Location: USA
|
Posted: Tue Apr 22, 2008 7:47 am Post subject: |
|
|
| Anonymous wrote: | | imapow wrote: | | ...but the game itslef gets boring ater 5min. |
...actually I'm already bored & I haven't even played it...I'm sorry, but I've never understood the "fun" in playing a text based "rpg"...no offense to Rhys, but I've seen this type of "game" before & I just don't get it..."text based games" really have no point in my mind..."You are walking down a hall"..."You hit a wall"..."You turned left"..."You were slashed by a zombie"...all that is text based on random bullshit (not Rhys script, I mean some old game I played for less than 5 mins), so no offense Rhys, but I don't see the point in any text based game...now if you use DllCall into OpenGL & show me a 3D Hall & a 3D zombie...it might be fun... |
Don't listen to this NOOB! Text based games are awesome! They only suck if you have to imagination. All my favorite RPG's have been text based, like the old might & magic series, wizardary for the old mac SE's, L.O.R.D (legend of the red dragon) now thats a good old school BBS game if ever there was one and it was fun as hell. Keep up the good work man!! I'm really keen to see where this project goes. I'd even be keen to offer my help. _________________ Check out my BF2 macros here: http://www.autohotkey.com/forum/viewtopic.php?t=29706 |
|
| Back to top |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 2592 Location: Australia, Qld
|
Posted: Tue Apr 22, 2008 7:59 am Post subject: |
|
|
@Guest:
Ever read a novel? Those generally don't have OpenGL or 3D zombies. Text based games serve the same purpose as any other game; you just need an imagination. As for this game, at least it's not as repetitive as your post.
| Quote: | | I'm sorry, but I've never understood the "fun" in playing a text based "rpg" |
| Quote: | | no offense to Rhys, but I've seen this type of "game" before & I just don't get it |
| Quote: | | "text based games" really have no point in my mind |
| Quote: | | so no offense Rhys, but I don't see the point in any text based game |
It did seem a little too easy, though. Perhaps Rhys could randomise the strength of the enemy for each new battle. (I suppose it'll have more variation when it is complete.)  |
|
| Back to top |
|
 |
Oberon
Joined: 18 Feb 2008 Posts: 458
|
Posted: Tue Apr 22, 2008 8:14 am Post subject: |
|
|
I also dislike text based games but for other reasons. Games cannot offer nearly as much as a book does in terms of empathy and a storyline, so the two are incomparable. Also the visual aspect of gaming is integral as games push human response time with visual images that provoke the sense of touch and play on fears and other emotions.
I don't mean to bash Rhys' script. I'm sure he done an excellent job  |
|
| Back to top |
|
 |
imapow
Joined: 13 Mar 2008 Posts: 162 Location: Trøndelag, Norway
|
Posted: Tue Apr 22, 2008 8:37 am Post subject: |
|
|
| Anonymous wrote: | | imapow wrote: | | ...but the game itslef gets boring ater 5min. |
...actually I'm already bored & I haven't even played it...I'm sorry, but I've never understood the "fun" in playing a text based "rpg"...no offense to Rhys, but I've seen this type of "game" before & I just don't get it..."text based games" really have no point in my mind..."You are walking down a hall"..."You hit a wall"..."You turned left"..."You were slashed by a zombie"...all that is text based on random bullshit (not Rhys script, I mean some old game I played for less than 5 mins), so no offense Rhys, but I don't see the point in any text based game...now if you use DllCall into OpenGL & show me a 3D Hall & a 3D zombie...it might be fun... |
textbased ames are fun if made corectly. Rhys have a good start here. at the moment the game is kind of boring but if you make it multyplater you can PvP compite, chat and shop with them. mod's are cool
keep working and you have yor self a nice game _________________ -._.-¨¯¨-._.-IM@PΩW-._.-¨¯¨-._.- |
|
| Back to top |
|
 |
Ian -- School Guest
|
Posted: Tue Apr 22, 2008 3:24 pm Post subject: |
|
|
| I am working on my own version now, it has potions (healing), Manta (Magic), and Arrows (Range). I only have the potions and melee working now, but when the opponent dies, a new one comes up. I'm going to add looting as well so you can get potions and arrows. |
|
| Back to top |
|
 |
Razlin
Joined: 05 Nov 2007 Posts: 395 Location: canada
|
Posted: Tue Apr 22, 2008 3:47 pm Post subject: |
|
|
Theres nothing here that says this will be a text based RPG.
I think Rhys is testing out the combat mechanics the BOOM. He will come out with 3D skelies that come out of the screen and eat your mice.
On a more serious note. Good job Rhys I love RPG's hopefully you get this working and maybe get to the storyline of your game.
Keep it up. _________________ -=Raz=- |
|
| Back to top |
|
 |
SoggyDog
Joined: 02 May 2006 Posts: 223 Location: Greeley, CO
|
Posted: Tue Apr 22, 2008 7:49 pm Post subject: |
|
|
@Everyone that's knocking this ''game''
Rhys is developing the core engine of what will certainly be a much larger project.
Using automobiles as an analogy, I don't care how pretty your car is, it isn't much good without an engine.
@Rhys
Go for it. I like where this is headed.
@Everyone
I absolutely LOVED Wizard's Castle
(Here's another link with a better description)
I still play it occasionally on a PC port (MS-DOS executable) and a PalmOS port (Commodore 64 emulated);
I've even considered porting it myself to AHK. _________________
SoggyDog
Download AutoHotKey Wallpaper
Does 'Fuzzy Logic' tickle? |
|
| Back to top |
|
 |
imapow
Joined: 13 Mar 2008 Posts: 162 Location: Trøndelag, Norway
|
Posted: Tue Apr 22, 2008 9:18 pm Post subject: |
|
|
| SoggyDog wrote: | @Everyone that's knocking this ''game''
Rhys is developing the core engine of what will certainly be a much larger project.
Using automobiles as an analogy, I don't care how pretty your car is, it isn't much good without an engine.
|
yeah just look at my game "BluemanShoot" if it had a good engine it wodent suck so bad  _________________ -._.-¨¯¨-._.-IM@PΩW-._.-¨¯¨-._.- |
|
| Back to top |
|
 |
Rhys
Joined: 17 Apr 2007 Posts: 730 Location: Florida
|
Posted: Tue Apr 22, 2008 9:19 pm Post subject: |
|
|
Thanks everyone for your input!
I'm fiddling around with different types of 'attacks' trying to make the combat more interesting. Ideally they'd all need to balance out in the 'big picture' otherwise It'd be best to always use the best attack.
I've thought about using a Rock-Paper-Scissors style system, but am not sure if I like that idea since it seems like it might leave too much to chance (especially when fighting the computer).
For example only...
Lunge vs Swing
-Lunge has higher hit chance and swing has 50% damage
Parry vs Lunge
-Parry has incresed crit and lunge has less damage/hit chance
Swing vs Parry
-Swing deflects parry and parry misses but swing has no crit chance
Another idea is to ditch the Rock<Paper<Scissors method and not have your attacks interact with the opponent - This is easier to code (especially when dealing with multiple enemies if I want to go that route).
Attack Types:
Strong: High damage, lowest hit and crit rates
Medium: Medium damage, average hit and crit rates
Light: Weak damage, high hit and crit rates
I did a little test to normalize these and came up with the following results last number is total damage:
Strong (50100 hits 4677 crits): 410975
Med (69824 hits 13281 crits): 415178
Light (90098 hits 44216 crits): 402704
Here's the test script I used for the above numbers: | Code: | SetBatchLines,-1
;Hit Chance
Hit_Strong=50
Hit_Med=70
Hit_Light=90
;Crit Chance
Crit_Strong=10
Crit_Med=20
Crit_Light=50
;Strong Attack
loop,100000
{
Random,Hit,1,100
If (Hit > Hit_Strong)
Continue
Random,Dmg,5,10
Random,Crit,1,100
If (Crit < Crit_Strong)
{
Dmg+=Dmg
StrongCrits++
}
StrongDmg+=Dmg
StrongHits++
}
;Medium Attack
loop,100000
{
Random,Hit,1,100
If (Hit > Hit_Med)
Continue
Random,Dmg,3,7
Random,Crit,1,100
If (Crit < Crit_Med)
{
Dmg+=Dmg
MedCrits++
}
MedDmg+=Dmg
MedHits++
}
;Strong Attack
loop,100000
{
Random,Hit,1,100
If (Hit > Hit_Light)
Continue
Random,Dmg,1,5
Random,Crit,1,100
If (Crit < Crit_Light)
{
Dmg+=Dmg
LightCrits++
}
LightDmg+=Dmg
LightHits++
}
MsgBox,,Results,
(
Strong (%StrongHits% hits %StrongCrits% crits): %StrongDmg%
Med (%MedHits% hits %MedCrits% crits): %MedDmg%
Light (%LightHits% hits %LightCrits% crits): %LightDmg%
) |
I'm still playing around with what I want to do with the different attacks, and then I have to figure out a magic/special attack system, etc... The more I get into this the tougher it seems, but for now I'm having fun so I will continue. Alpha 3 will be attached soon. _________________ [Join IRC!]
 |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|