Page 1 of 1

DamageType ???

Posted: Sat Jun 25, 2016 6:07 pm
by Mutley
Where can I move the "DamageType" that exists in weapons?
Example:

Code: Select all

Weapon 0x13B2
{
	//MainStuff
	Name		Bow
	Desc		bow
	VendorBuysFor	29
	VendorSellsFor	58

	//WeaponInfo
	Speed		35
	Attribute	Archery
	Anim		0x12
	Damage		4d4+6
	HitSound	0x235
	MissSound	0x239
	ProjectileAnim	0xf42
	ProjectileType	0xf3f
	ProjectileSound	0x235
	MinRange        1
	MaxRange	18
	MaxHP           45

	//Booleans
	Projectile	1
	TwoHanded	1
	DamageType	2

	//Scripts
	Script      	:equipment:useItem
	DestroyScript	:equipment:onDestroy

	//Custom Values
	strrequired	20
	repairable	1
}
Where do I find this "DamageType 2" ???

Thanks

Re: DamageType ???

Posted: Sat Jun 25, 2016 6:52 pm
by Mutley
Ok, I found the call

C:\MyShard\Distro\pkg\systems\combat\include\combat_math

Code: Select all

        var applyType;
        case( damageType )
               1:   applyType := DMG_PHYSICAL;
                    break;
               2:   applyType := DMG_RANGED;
                    break;
               3:   applyType := DMG_ASTRAL;
                    break;
        endcase
But where I find "DMG_Ranged" ???
Each arrow that shoots consumes 30 stam :/

Re: DamageType ???

Posted: Sat Jun 25, 2016 7:00 pm
by Mutley
Ok... C:\MyShard\Distro\pkg\systems\combat\mainHitScript

Code: Select all

//Ranged
       	     2: if( attacker.enabled( "firewhilemoving" ))
                         if( !AP_ConsumeVital( attacker, STAMINA, 30 ))
                                  return 0;
                         endif
                endif
:)

Re: DamageType ???

Posted: Mon Jun 27, 2016 12:30 am
by Nando
Nice that you found the answers by yourself. Just be aware that this is distro-specific. ;)