init
This commit is contained in:
86
zscript/weapon/lgzorcherhga.zs
Normal file
86
zscript/weapon/lgzorcherhga.zs
Normal file
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
* Copyright © 2024 Nicole O'Connor
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
class LargeZorcherHGA : LargeZorcher replaces LargeZorcher {
|
||||
Default {
|
||||
Weapon.SisterWeapon "LargeZorcherBuffed";
|
||||
}
|
||||
|
||||
action void A_FireShotgunBuffed() {
|
||||
// largely the same as the standard A_FireShotgun, with some changes because it's... buffed...
|
||||
if (player == null) { return; }
|
||||
|
||||
A_StartSound("weapons/shotgf", CHAN_WEAPON);
|
||||
Weapon weap = player.ReadyWeapon;
|
||||
if (weap != null && invoker == weap && stateinfo != null && stateinfo.mStateType == STATE_Psprite) {
|
||||
if (!weap.DepleteAmmo (weap.bAltFire, true, 1)) { return; }
|
||||
|
||||
player.SetPsprite(PSP_FLASH, weap.FindState('Flash'), true);
|
||||
}
|
||||
player.mo.PlayAttacking2 ();
|
||||
|
||||
double pitch = BulletSlope ();
|
||||
for (int i = 0; i < 7; i++) {
|
||||
int damage = 7 * random[GunShot](2, 4);
|
||||
double ang = angle;
|
||||
let accurate = false;
|
||||
if (!accurate) {
|
||||
ang += Random2[GunShot]() * (3.125 / 256);
|
||||
if (GetCVar ("vertspread") && !sv_novertspread) {
|
||||
pitch += Random2[GunShot]() * (1.675 / 256);
|
||||
}
|
||||
}
|
||||
LineAttack(ang, PLAYERMISSILERANGE, pitch, damage, 'Hitscan', "BulletPuff");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class LargeZorcherBuffed : LargeZorcherHGA {
|
||||
Default {
|
||||
+WEAPON.POWERED_UP;
|
||||
Weapon.SisterWeapon "LargeZorcherHGA";
|
||||
|
||||
Weapon.AmmoUse 2;
|
||||
Weapon.AmmoGive 0;
|
||||
}
|
||||
|
||||
States {
|
||||
Ready:
|
||||
SSHT A 1 A_WeaponReady;
|
||||
Loop;
|
||||
Deselect:
|
||||
SSHT A 1 A_Lower;
|
||||
Loop;
|
||||
Select:
|
||||
SSHT A 1 A_Raise;
|
||||
Loop;
|
||||
Fire:
|
||||
SSHT A 3;
|
||||
SSHT A 7 A_FireShotgunBuffed;
|
||||
SSHT A 3;
|
||||
SSHT A 7 A_FireShotgunBuffed;
|
||||
SSHT BC 5;
|
||||
SSHT D 4;
|
||||
SSHT CB 3;
|
||||
SSHT A 3;
|
||||
SSHT A 7 A_ReFire;
|
||||
Goto Ready;
|
||||
Flash:
|
||||
SSHF A 4 Bright A_Light1;
|
||||
SSHF B 3 Bright A_Light2;
|
||||
Goto LightDone;
|
||||
}
|
||||
}
|
72
zscript/weapon/rpdzorcherhga.zs
Normal file
72
zscript/weapon/rpdzorcherhga.zs
Normal file
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* Copyright © 2024 Nicole O'Connor
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
class RapidZorcherHGA : RapidZorcher replaces RapidZorcher {
|
||||
Default {
|
||||
Weapon.SisterWeapon "RapidZorcherBuffed";
|
||||
}
|
||||
|
||||
action void A_FireRailgun() {
|
||||
if (player == null) { return; }
|
||||
|
||||
// every time i use this weapon sound, i think fondly of my wife
|
||||
//A_StartSound("weapons/railgf", CHAN_WEAPON);
|
||||
Weapon weap = player.ReadyWeapon;
|
||||
if (weap != null && invoker == weap && stateinfo != null && stateinfo.mStateType == STATE_Psprite) {
|
||||
if (!weap.DepleteAmmo (weap.bAltFire, true, 6)) { return; }
|
||||
|
||||
player.SetPsprite(PSP_FLASH, weap.FindState('Flash'), true);
|
||||
}
|
||||
player.mo.PlayAttacking2();
|
||||
|
||||
A_RailAttack(70, 0, false, "1f91ff", "b7dcff", RGF_SILENT | RGF_FULLBRIGHT, 1.5, range:16384);
|
||||
}
|
||||
}
|
||||
|
||||
class RapidZorcherBuffed : RapidZorcherHGA {
|
||||
Default {
|
||||
+WEAPON.POWERED_UP;
|
||||
Weapon.SisterWeapon "RapidZorcherHGA";
|
||||
|
||||
Weapon.AmmoUse 6;
|
||||
Weapon.AmmoGive 0;
|
||||
}
|
||||
|
||||
States
|
||||
{
|
||||
Ready:
|
||||
SCHG A 1 A_WeaponReady;
|
||||
Loop;
|
||||
Deselect:
|
||||
SCHG A 1 A_Lower;
|
||||
Loop;
|
||||
Select:
|
||||
SCHG A 1 A_Raise;
|
||||
Loop;
|
||||
Fire:
|
||||
SCHG AB 4 A_FireRailgun;
|
||||
SCHG B 0 A_ReFire;
|
||||
Goto Ready;
|
||||
Flash:
|
||||
SCHF A 5 Bright A_Light1;
|
||||
Goto LightDone;
|
||||
SCHF B 5 Bright A_Light2;
|
||||
Goto LightDone;
|
||||
Spawn:
|
||||
MGUN A -1;
|
||||
Stop;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user