Stu's Rusty Bucket

Item/Spell/Monster intricacies and combat

So I started on some magic code, data actually, writing a couple of spell descriptions in a lua table, which also lead to some minimal monster loading code that tied into the item code! Oh the tangled web.

Lets backup for a second to extrapolate the intertwining of the three.

We have a monster the FROST GIANT, his description looks something like this;

	type = mn_Giant,
	name = "FROST GIANT",
	tile = 4,
	magic_regen = missle_Ice,
	tile_size=tile_Tall

His Type and his MagicRegen tie into both items and magic respectively.

For items, there is the feared “GIANT KILLA” two handed sword +2 vs giants (fake item) that looks like this;

	type = itm_Sword
	hands = 2
	vs = {{ vs_mon_type=mn_Giant, vs_amount = 2}}

(Note the vs is a table inside of a table so you can have multiple vs’ entries. So a PC wielding a GIANT KILLA sword hits a monster of type mn_Giant, a bonus is applied of +2.
This is a nice way of making some basic customized items like a mace vs undead or the flaming ice pick (that affects only things afraid of Fire).

Then there is the magic portion, since its a Frost giant, cold spells can heal, so the Ice Bolt spell;

	name = "ICE BOLT",
	mpcost = 15,
	func = "CAST_SP_LIGHTENING_BOLT",
	range=12,
	damage={15,25},
	mtype = missle_Ice

Its functionally equivalent to a lightening bolt, only with ice, so any would be damage of missle_Ice used on monsters whose magic_regen = missle_Ice has the inverse effect, its heals as opposed to harms.

I just need to brainstorm my basic monsters and their high level attributes where attributes are like

* elemental (fire/ice/etc)
* Stoning (against reflect/sliver, can stone)
* Heals over time (trolls)
* Undead (can be turned)
* Size (Tall, short)

I also need to do the same to the spells

* Range (touch, party, reduced damage over range)
* Combat only spells / Party Only spells
* Caster Affected only
* Targets area or monster (target area size)

and so on.

I’ve already detailed some combat thoughts earlier on in the blog (HERE), on movement points and the like, so now onto some more details.

Every one (PC and NPC) in combat will have two levels of alliance, tho I may scale it back to one level.

Level one would be group
Level two would be faction.

Think about a three way brawl.  You kick the door open and a small band of Malcontent fighters is duking it out with a small band of NonConformist fighters.

Right now it would be;

Party = Group 1
Malcontents = Group 2
NonConformists = Group 3

But earlier in the game, you saved the king of the Malcontents, which shifts the alliances to;

Party = Alliance 1
Malcontents = Alliance 1 (un aligned Alliance 2)
NonConformists = Alliance 3

(You have a current alliance and a base alliance).

The Malcontents would know not to attack the Party because they are allies. However, should a party member attack a Malcontent, the alliances would shift to

Party = Alliance 1
Malcontents = Alliance 2
NonConformist = Alliance 3

It now becomes down to Group 2 members attacking the nearest Group 1 or Group 3 members. (The current alliance was replaced by the base alliance. The base alliance never gets changed, only the current alliance level).

It may come down to every enemy having its own group/alliance and being a free for all in combat.

This also works for things like charm spells, where you can magically switch an opponents party alliance to you for a period of time, their group indicator would then then switch to being grouped with the party (again, you have a current group and a base group).

I think this is complex enough without being too complex, ie: you could add a weighting to the alliance level so with more than two alliances on the field of combat, to be used by the combatant to prioritize which enemy they attack instead of just the closest enemy to them.

It might turn out that its not really feasible to have a two level grouping like this and revert back to just using a Group mode, or remove it all together and have a Party vs Everyone Else mode.

Posted by on 12/04 at 12:24 PM    
Filed Under : ComputersDevelopmentFishguts
Comments are closed There are no comments on this entry.

Next entry: Items redux

Previous entry: Party Ordering

<< Back to main