Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /// <summary>
- /// Adds the damage effect that applies on misses to all the shotgun's templates
- /// </summary>
- static event OnPostTemplatesCreated()
- {
- ModifyTemplateAllDiff('Shotgun_CV', class'X2WeaponTemplate', PatchWeaponTemplateCV);
- ModifyTemplateAllDiff('Shotgun_MG', class'X2WeaponTemplate', PatchWeaponTemplateMGBM);
- ModifyTemplateAllDiff('Shotgun_BM', class'X2WeaponTemplate', PatchWeaponTemplateMGBM);
- ModifyTemplateAllDiff('TLE_Shotgun_CV', class'X2WeaponTemplate', PatchWeaponTemplateCV);
- ModifyTemplateAllDiff('TLE_Shotgun_MG', class'X2WeaponTemplate', PatchWeaponTemplateMGBM);
- ModifyTemplateAllDiff('TLE_Shotgun_BM', class'X2WeaponTemplate', PatchWeaponTemplateMGBM);
- ModifyTemplateAllDiff('ChosenShotgun_CV', class'X2WeaponTemplate', PatchWeaponTemplateCV);
- ModifyTemplateAllDiff('ChosenShotgun_MG', class'X2WeaponTemplate', PatchWeaponTemplateMGBM);
- ModifyTemplateAllDiff('ChosenShotgun_BM', class'X2WeaponTemplate', PatchWeaponTemplateMGBM);
- ModifyTemplateAllDiff('ChosenShotgun_T4', class'X2WeaponTemplate', PatchWeaponTemplateMGBM);
- ModifyTemplateAllDiff('ChosenShotgun_XCOM', class'X2WeaponTemplate', PatchWeaponTemplateMGBM);
- }
- /// <summary>
- /// Sets up the damage effect that applies on misses for conventional shotguns
- /// </summary>
- static function PatchWeaponTemplateCV(X2DataTemplate DataTemplate)
- {
- local X2Effect_ApplyWeaponDamage DamageEffect;
- local X2WeaponTemplate Template;
- DamageEffect = new class'X2Effect_ApplyWeaponDamage';
- DamageEffect.bApplyOnHit = false;
- DamageEffect.bApplyOnMiss = true;
- DamageEffect.bIgnoreBaseDamage = true;
- DamageEffect.bAllowWeaponUpgrade = true;
- DamageEffect.bAllowFreeKill = false;
- DamageEffect.EffectDamageValue.Damage = 1;
- Template = X2WeaponTemplate(DataTemplate);
- Template.BonusWeaponEffects.AddItem(DamageEffect);
- }
- /// <summary>
- /// Sets up the damage effect that applies on misses for magnetic and plasma shotguns
- /// </summary>
- static function PatchWeaponTemplateMGBM(X2DataTemplate DataTemplate)
- {
- local X2Effect_ApplyWeaponDamage DamageEffect;
- local X2WeaponTemplate Template;
- DamageEffect = new class'X2Effect_ApplyWeaponDamage';
- DamageEffect.bApplyOnHit = false;
- DamageEffect.bApplyOnMiss = true;
- DamageEffect.bIgnoreBaseDamage = true;
- DamageEffect.bAllowWeaponUpgrade = true;
- DamageEffect.bAllowFreeKill = false;
- DamageEffect.EffectDamageValue.Damage = 2;
- Template = X2WeaponTemplate(DataTemplate);
- Template.BonusWeaponEffects.AddItem(DamageEffect);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement