Talk:Thoughts on Combat Models

From RogueBasin
Jump to navigation Jump to search

All these possibilities look very nice, but what are the differences? We need to have some more in depth study what the different variants do, and what the consequences of each choice are. For example:

Enemy.HP -= min(Player.ATK - Enemy.DEF, 0);

this variant makes your enemy always immune to attack if their def > atk.

I think that ideally you would like to have systems that have bell curves of damage and chances to hit. But these subjects are not even considered here. Currently the page is just a list of different systems that you can use without any consideration why or how. Any ideas what more could be included here? --Soyweiser 15:45, 4 August 2008 (CEST)

My program is already designed to have chances to hit, but I'm not planning for bell curves for damage. I have thought about bell curves to hit in many other older programs as well. This is a example of a bell curve program in QBASIC:

c1# = 2.506628#
c2# = .3193815#
c3# = -.3565638#
c4# = 1.7814779#
c5# = -1.821256#
c6# = 1.3302744#
IF z# > 0 OR z# = 0 THEN
    w# = 1
ELSE
    w# = -1
END IF
y# = 1 / (1 + .2316419# * w# * z#)
z3# = (c4# + y# * (c5# + y# * c6#))
z2# = (y# * (c2# + y# * (c3# + y# * z3#)))
z1# = .5 - (EXP(-z# * z# / 2) / c1#) * z2#
BellCurve# = .5 + w# * z1#

--Zzo38 18:42, 4 August 2008 (CEST)

I think of defense as a deflection value and use the following check.

To hit calculation:

x=(attack / target evasion) * 0.5
 x then clamped between 0.1 and 0.9
rand(0,1) < x = HIT!

Damage calculation:

Damage = rand ( Weapon min , Weapon max)

Target defense(deflection value) applied:

Damage = Damage - rand (0,defense of armor) - (damage resistance)
Damage applied if greater then 0.

--Willraman 17:08, 25 March 2011 (UTC)