[Logo]
 
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Possibility: Applying RPGWeapon bonuses to turrets/vehicles  XML
Forum Index -> Druids RPG Development
Author Message
Szlat

Wicked Sick!

Joined: 05/18/2005 18:32:41
Messages: 2124
Location: UK
Offline

Initially discussed in http://www.disastrousconsequences.com/dcforum/posts/list/2553.page
Letting the turret take on RPGWeapon properties.

Szlat wrote:
Is the simplest way of doing this to let the turret (or vehicle) take on the RPGWeapon properties of the weapon the driver last had?
So if a medic with a healing weapon gets into a turret, the turret acts as a healing turret. If a LA with a knockback+5 gets in, the turret acts as a knockback+5. These attributes would go with the player when he left the turret. I think it may be possible to have an ability that could partially do this. Create a HandleDamage function in the ability, and call the RPGWeapon(Vehicle(Instigator).Driver.Weapon).NewAdjustTargetDamage function.  

For example, something like:
Code:
static function HandleDamage(int Damage, Pawn Injured, Pawn Instigator, out vector Momentum, 
                     class<DamageType> DamageType, bool bOwnedByInstigator, int AbilityLevel)
 {
 	local Pawn P;
 	local RPGWeapon RW;
 
 	// if bOwnedByInstigator == true then I am doing the damge, so I am Instigator
 	// if false, then I am Injured
 
 	if (bOwnedByInstigator)
 	{
 		if (Vehicle(Instigator) == None)
 			return;
 		P = Vehicle(Instigator).Driver;
 	}
 	else
 	{
 		if (Vehicle(Injured) == None)
 			return;
 		P = Vehicle(Injured).Driver;
 	}
 
 	if (P == None)
 		return;
 
 	if (P.Weapon == None || RPGWeapon(P.Weapon) == None)
 		return;
 
 	RW = RPGWeapon(P.Weapon);
 	if (bOwnedByInstigator)
 		RW.NewAdjustTargetDamage(Damage, Damage, Injured, Injured.Location, Momentum, DamageType);
 	else
 		RW.AdjustPlayerDamage(Damage, Instigator, Injured.Location, Momentum, DamageType);
 }
 


This should work for weapons like vampire, healing, energy, poison, null entropy etc where all the effect is in the AdjustPlayerDamage function. But it wouldn't work for luck, infinity, force, speedy etc. that use timers or other functions.
I tried it with a vampire weapon and it worked. However, poison didn't seem to, so I think there may be a bit more to it.

We would obviously have to check for vorpal mini-turrets etc . However, the new code in OneDropWeapon for checking damagetype against the RPGWeapon would probably prevent it initially. We would need to work around that.

I am in two minds. Part of me thinks it would be fun. Part of me thinks let's leave turrets etc totally independent of the RPGWeapon code.

I think there are 3 different things to consider - sentinels, turrets and vehicles.
It may be worth doing it for turrets and not for vehicles or sentinels.
We could easily include that check in the code.

Thoughts? Is it a good idea, or not.
Moof

Wicked Sick!
[Avatar]
Joined: 06/24/2006 19:42:44
Messages: 433
Location: College Park, MD
Offline

Um. It's great, but the questions we would want to answer is what happens when you put, say, Moof in a Goliath with a Rage 10. +50% damage from stats and abilities, +100% from the Rage weap. That's A WHOLE DARN TON OF DAMAGE.

Or, what about Dr._Moof? Healing Leviathan?

Moof, Scholar of Ni

Moof (W); Dr. Moof (M); Engimoof (E); Moofgineer (E beta)
[Yahoo!] aim icon [ICQ]
 
Forum Index -> Druids RPG Development
Go to: