Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DECORATE:
- Actor DemonModeAltfire : FastProjectile {
- RenderStyle Add
- Radius 13
- Height 13
- Scale 0.1
- Speed 1
- Damage (CallACS ("FDDemonModeAltDamage"))
- Projectile
- States {
- Spawn:
- TNT1 A 0
- TNT1 A 0 A_ChangeFlag (ExtremeDeath, Random (Random (1, 0), 1))
- TNT1 A 0 A_ScaleVelocity (35.0)
- Spawn2:
- DMNA A 1 Bright
- Loop
- Death:
- TNT1 A 0 A_RadiusThrust (CallACS ("FDDemonModeAltExpRT"), 128, RTF_AFFECTSOURCE * CallACS ("FDDemonModeAltExpFlagRandomizer"))
- TNT1 A 0 A_Explode (CallACS ("FDDemonModeAltExpDamage"), CallACS ("FDDemonModeAltExpRadius"), XF_HURTSOURCE * CallACS ("FDDemonModeAltExpFlagRandomizer"))
- Stop
- }
- }
- ACS:
- script "FDDemonModeAltDamage" (void) {
- // Pray to the RNG god
- int BaseDamage = Random (Random (1, 3), Random (4, 8));
- int Randomizer1 = Random (Random (1, 10), Random (1, 10));
- int Randomizer2 = Random (0, Random (1, 2));
- int Result = 0;
- int x = Randomizer1 * BaseDamage;
- if (Randomizer2 == 1) {
- Result = (x * Random (2, 4)) + ((x / Random (2, 5)) >> 16 * Random (1, 2));
- } else if (Randomizer2 == 2)
- Result = x + Random (2, 4) * (x / Random (2, 5));
- else
- Result = x * 2.5 >> 16;
- SetResultValue (Result);
- }
- script "FDDemonModeAltExpDamage" (void) {
- int Randomizer1 = Random (
- Random (
- Random (0, 64),
- Random (65, 128)),
- Random (
- Random (129, 193),
- Random (194, 256)));
- int Randomizer2 = Random (1, 4);
- int Result = 0;
- Result = (Randomizer1 / Randomizer2) >> 16;
- SetResultValue (Result);
- }
- script "FDDemonModeAltExpRadius" (void) {
- int Randomizer1 = Random (
- Random (
- Random (0, 32),
- Random (33, 64)),
- Random (
- Random (65, 96),
- Random (96, 128)));
- int Randomizer2 = Random (1, 4);
- int Result = 0;
- Result = (Randomizer1 / Randomizer2) >> 16;
- SetResultValue (Result);
- }
- int FDDemonModeAltExpRTMass [13] = {
- 100,
- 250,
- 580,
- 379,
- 158,
- 190,
- 129,
- 1598,
- 2000,
- 1299,
- 1598,
- 159,
- 1795
- };
- int FDDemonModeAltExpRTForce [12] = {
- 25,
- 30,
- 45,
- 10,
- 100,
- 94,
- 38,
- 19,
- 67,
- 198,
- 279,
- 17
- };
- script "FDDemonModeAltExpRT" (void) {
- // Mass randomizer
- int Randomizer1 = Random ( // L0: None
- Random ( // L1: Min
- Random ( // L2: Min
- Random (0, 2), // L3: Min
- Random (3, 4)), // L3: Max
- Random ( // L2: Max
- Random (5, 7), // L3: Min
- Random (8, 10))), // L3: Max
- Random ( // L1: Max
- Random (11, 12), // L2: Min
- Random (12, 13))); // L2: Max
- // Force randomizer
- int Randomizer2 = Random (
- Random ( // L1: Min
- Random ( // L2: Min
- Random (0, 1), // L3: Min
- Random (2, 3)), // L3: Max
- Random ( // L2: Max
- Random (4, 6), // L3: Min
- Random (7, 8))), // L3: Max
- Random ( // L1: Max
- Random (9, 10), // L2: Min
- Random (11, 12))); // L2: Max
- // Result
- int Result = 0;
- // Result = Force * (2 * Mass)
- Result = FDDemonModeAltExpRTForce [Randomizer2] * (2 * FDDemonModeAltExpRTMass [Randomizer1]);
- SetResultValue (Result >> 16);
- }
- script "FDDemonModeAltExpFlagRandomizer" (void) {
- int Result = 0;
- if (GetCVar ("FD_IDontBelieveInGod"))
- Result = 0;
- else
- Result = Random (Random (0, 1), Random (1, 0));
- SetResultValue (Result);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement