Skip to content

Commit

Permalink
Major Changes:
Browse files Browse the repository at this point in the history
- Added -lol, -laugh and -l. Does what you think it does
- Added grunt sounds to various abilities, non gachi.
- If alien dies before 5 minutes it now repicks
- Added unique skins to Moderators, Developers and map supporters
- Added new **Fuller Auto** ability to minigun. It's like Fulla uto, except fuller.

Minor Changes:
- Scanning for players lasts longer and should be easier to see
  • Loading branch information
Eonfuzz committed Dec 3, 2020
1 parent 72cded3 commit eeff0cb
Show file tree
Hide file tree
Showing 22 changed files with 193 additions and 44 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added maps/askellon-sector.w3x/splat_line.mdx
Binary file not shown.
Binary file added maps/askellon-sector.w3x/ubersplat_danger.dds
Binary file not shown.
Binary file modified maps/askellon-sector.w3x/war3map.doo
Binary file not shown.
Binary file modified maps/askellon-sector.w3x/war3map.imp
Binary file not shown.
Binary file modified maps/askellon-sector.w3x/war3map.w3a
Binary file not shown.
Binary file modified maps/askellon-sector.w3x/war3map.w3d
Binary file not shown.
Binary file modified maps/askellon-sector.w3x/war3map.w3i
Binary file not shown.
50 changes: 43 additions & 7 deletions maps/askellon-sector.w3x/war3map.wts
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ rlev
}

STRING 202
// Abilities: A003 (Sprint), Ubertip (Tooltip - Normal - Extended)
// Abilities: ASPI (Acidic Stigmata), Ubertip (Tooltip - Normal - Extended)
{
|cff808080Routine physical exercises are a requirement for any longer duration space travel.|r|n|nIncreases movement speed by |cffd45e1260%|r for |cffd45e122 seconds|r and |cffd45e19leaps forwards based on the distance moved.|r|n|n|cff80808015 Second Cooldown|r
}
Expand Down Expand Up @@ -2821,12 +2821,6 @@ STRING 739
[|cffffff00W|r] - Sprint
}

STRING 742
// Abilities: ASPI (Acidic Stigmata), Ubertip (Tooltip - Normal - Extended)
{
|cff808080Routine physical exercises are a requirement for any longer duration space travel.|r|n|nIncreases movement speed by |cffd45e1260%|r for |cffd45e122 seconds|r and |cffd45e19leaps forwards based on the distance moved.|r|n|n|cff80808015 Second Cooldown|r
}

STRING 744
// Upgrades: R007 (Iron Forged Swords,Steel Forged Swords,Mithril Forged Swords), Hotkey (Hotkey)
{
Expand Down Expand Up @@ -6780,3 +6774,45 @@ STRING 1577
|cff808080LORE TODO|r|n|n|cffffcc00Major Station Research [3/4]|r|nInstalls firmware updates on space ships|n|cff00ff00- Dodging costs no mana|n- Damage of Autocannons increased by 50%|n- Mining Laser speed increased by 50%|n- Drones now ferry mined ore back to the Askellon|r|n|n|cffffcc00Occupation Bonus [PILOT / NAVIGATOR]|r|n|cff00ff00- Macro Las fuel cost reduced by 5|r|n|n|cff8a6df2Infestation [ALIEN]|n- Deliver 250 more Minerals to cause a disaster
}

STRING 1578
// Doodads: D01L (Ubersplat Danger), Name (Name)
{
Ubersplat Danger
}

STRING 1579
// Abilities: A02D (Fuller Auto), Hotkey (Hotkey - Normal)
{
F
}

STRING 1580
// Abilities: A02D (Fuller Auto), Unhotkey (Hotkey - Turn Off)
{
F
}

STRING 1581
// Abilities: A02D (Fuller Auto), Tip (Tooltip - Normal)
{
Fuller Auto
}

STRING 1582
// Abilities: A02D (Fuller Auto), Ubertip (Tooltip - Normal - Extended)
{
|cff808080They told me it couldn't be done. I made it be done.|n|n|rActivates the |cff00ff00Fuller than Full Auto|r mode on the Flamesaw, dramatically increasing attack speed. Lasts 10 seconds.|n|n|cff80808090 Seconds Cooldown|r
}

STRING 1584
// Abilities: A02D (Fuller Auto), Name (Name)
{
Fuller Auto
}

STRING 1585
// Abilities: A003 (Sprint), Ubertip (Tooltip - Normal - Extended)
{
|cff808080Routine physical exercises are a requirement for any longer duration space travel.|r|n|nIncreases movement speed by |cffd45e1250%|r for |cffd45e127 seconds|r and |cffd45e19leaps forwards based on the distance moved.|r|n|n|cff80808015 Second Cooldown|r
}

Binary file modified maps/askellon-sector.w3x/war3mapMap.blp
Binary file not shown.
5 changes: 4 additions & 1 deletion src/app/abilities/ability-hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ import {
ABIL_SYSTEM_REACTOR_ROTATE_SHIELD_FREQUENCY,
ABIL_DROP_MINERALS,
ABIL_ACTIVATE_SCAN_CREW,
ABIL_ACTIVATE_SCAN_ALIENS
ABIL_ACTIVATE_SCAN_ALIENS,
ABIL_WEP_MINIGUN_FULLER_AUTO
} from "resources/ability-ids";
import { AT_ABILITY_DRAGONFIRE_BLAST, SNIPER_ABILITY_ID } from "app/weapons/weapon-constants";
import { DragonFireBlastAbility } from "./human/dragonfire-blast";
Expand Down Expand Up @@ -96,6 +97,7 @@ import { LaserBroadsideAbility } from "./station/laser-broadside";
import { DivertToWeaponsAbiility } from "./station/divert-weapons";
import { DropMineralsAbility } from "./items/drop-minerals";
import { StationSecurityScanForPlayer } from "./station/scan-for-player";
import { MinigunFullerAutoAbility } from "./human/minigun-fuller-auto";



Expand Down Expand Up @@ -182,6 +184,7 @@ AbilityHooks.Add(ABIL_GENE_XENOPHOBIC_PUNCH, () => new XenophobicPunchAbility())
AbilityHooks.Add(ABIL_GENE_INSTANT_HEAL, () => new InstantHealAbility());
AbilityHooks.Add(ABIL_SYSTEM_REACTOR_DIAGNOSTICS, () => new ReactorDiagnosticsAbility());
AbilityHooks.Add(ABIL_SYSTEM_PURGE_VENTS, () => new VentPurgeAbility());
AbilityHooks.Add(ABIL_WEP_MINIGUN_FULLER_AUTO, () => new MinigunFullerAutoAbility());

ABIL_SECURITY_TARGET_ALL.forEach(a => {
AbilityHooks.Add(a, () => new StationSecurityTargetAbility());
Expand Down
48 changes: 48 additions & 0 deletions src/app/abilities/human/minigun-fuller-auto.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import { Ability } from "../ability-type";
import { Unit } from "w3ts/handles/unit";
import { BUFF_ID } from "resources/buff-ids";
import { SoundRef } from "app/types/sound-ref";
import { FilterIsAlive } from "resources/filters";
import { Effect } from "w3ts/index";
import { ForceEntity } from "app/force/force-entity";
import { DynamicBuffEntity } from "app/buff/dynamic-buff-entity";
import { BuffInstanceDuration } from "app/buff/buff-instance-duration-type";
import { AbilityHooks } from "../ability-hooks";
import { ABIL_GENE_COSMIC } from "resources/ability-ids";
import { PlayerStateFactory } from "app/force/player-state-entity";
import { Minigun } from "app/weapons/guns/minigun";

const FullerAutoSounds = [ new SoundRef("Sounds\\minigun_fullerauto_1.mp3", false), new SoundRef("Sounds\\minigun_fullerauto_2.mp3", false) ];

export class MinigunFullerAutoAbility implements Ability {

private unit: Unit | undefined;
private wep: Minigun;

private duration = 5;

constructor() {}

public initialise() {
this.unit = Unit.fromHandle(GetTriggerUnit());
FullerAutoSounds[ GetRandomInt(0, FullerAutoSounds.length -1)].playSoundOnUnit(this.unit.handle, 127);

const crew = PlayerStateFactory.getCrewmember(this.unit.owner);
if (crew && crew.unit === this.unit) {
const minigun = crew.weapon as Minigun;
this.wep = minigun;
this.wep.fullerAutoActive = true;
}
return true;
};

public process(delta: number) {
this.duration -= delta;
return this.duration > 0;
};

public destroy() {
this.wep.fullerAutoActive = false;
return true;
};
}
30 changes: 19 additions & 11 deletions src/app/abilities/human/sprint-leap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,20 @@ import { SPRINT_BUFF_ID } from "resources/ability-ids";
import { Vector3 } from "app/types/vector3";
import { getZFromXY } from "lib/utils";
import { LeapEntity } from "app/leap-engine/leap-entity";
import { SoundRef } from "app/types/sound-ref";

/** @noSelfInFile **/

const TECH_UPGRADE_SPRINT_LEAP = FourCC('R001');

export class SprintLeapAbility implements Ability {

private unit: unit | undefined;
private distanceTravelled: number = 0;

private timeElapsed = 0;
private timeAtZeroDelta = 0;
private unitLastLoc: Vector2 | undefined;


private sound: SoundRef;
constructor() {}

public initialise() {
Expand All @@ -30,6 +31,7 @@ export class SprintLeapAbility implements Ability {
this.unitLastLoc = vectorFromUnit(this.unit);

// Play crew effort sound
this.sound = new SoundRef("Sounds\\minigun_fullerauto_1.mp3", false);

return true;
};
Expand All @@ -39,16 +41,22 @@ export class SprintLeapAbility implements Ability {

if (this.unit && UnitHasBuffBJ(this.unit, SPRINT_BUFF_ID) && this.unitLastLoc) {
const newPos = vectorFromUnit(this.unit);
const delta = newPos.subtract(this.unitLastLoc).getLength();
const dPos = newPos.subtract(this.unitLastLoc).getLength();

// If they've stopped moving, kill buff return false
// Require some time to be elapsed before this thing ends
if (delta === 0 && this.timeElapsed > 0.3) {
UnitRemoveBuffBJ(SPRINT_BUFF_ID, this.unit);
return false;
if (dPos === 0 && this.timeElapsed > 0.3) {
this.timeAtZeroDelta += delta;

if (this.timeAtZeroDelta > 0.2) {
UnitRemoveBuffBJ(SPRINT_BUFF_ID, this.unit);
return false;
}
}
else {
this.timeAtZeroDelta = 0;
}

this.distanceTravelled = (delta == 0) ? 0 : (this.distanceTravelled + delta)
this.unitLastLoc = newPos;
}
else {
Expand All @@ -58,7 +66,8 @@ export class SprintLeapAbility implements Ability {
};

public destroy() {
if (this.unit) {
if (this.unit) {
this.sound.playSoundOnUnit(this.unit, 50);
let targetLoc = new Vector3(GetUnitX(this.unit), GetUnitY(this.unit), 0);
targetLoc.z = getZFromXY(targetLoc.x, targetLoc.z);

Expand All @@ -71,10 +80,9 @@ export class SprintLeapAbility implements Ability {
BlzSetSpecialEffectYaw(sfx, GetRandomInt(0, 360));
DestroyEffect(sfx);

let unit = this.unit;
LeapEntity.getInstance().newLeap(
this.unit,
targetLoc.projectTowards2D(GetUnitFacing(this.unit), this.distanceTravelled/2),
targetLoc.projectTowards2D(GetUnitFacing(this.unit), 350),
30,
1
).onFinish(() => {
Expand Down
6 changes: 3 additions & 3 deletions src/app/abilities/station/scan-for-player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class StationSecurityScanForPlayer implements Ability {
if (pData && crew && crew.unit && crew.unit.isAlive() && crew.unit === pMain) {
if (p.id < playerColors.length) {
const c = playerColors[p.id];
if (c) PingMinimapEx(pMain.x, pMain.y, 6, c.red, c.green, c.blue, false);
if (c) PingMinimapEx(pMain.x, pMain.y, 15, c.red, c.green, c.blue, false);
}
else {
Log.Warning(`${p.id} not in rgb colour array`);
Expand All @@ -63,7 +63,7 @@ export class StationSecurityScanForPlayer implements Ability {
PlayerStateFactory.getAlienAI().forEach(p => {
GroupEnumUnitsOfPlayer(uGroup, p.handle, Filter(() => {
const u = GetFilterUnit();
PingMinimapEx( GetUnitX(u), GetUnitY(u), 3, 153, 51, 255, false);
PingMinimapEx( GetUnitX(u), GetUnitY(u), 15, 153, 51, 255, false);
return false;
}));
GroupClear(uGroup);
Expand All @@ -75,7 +75,7 @@ export class StationSecurityScanForPlayer implements Ability {
alienForce.getPlayers().forEach(p => {
if (alienForce.isPlayerTransformed(p)) {
const u = alienForce.getActiveUnitFor(p);
PingMinimapEx(u.x, u.y, 3, 153, 51, 255, false);
PingMinimapEx(u.x, u.y, 15, 153, 51, 255, false);
}
});
}
Expand Down
25 changes: 24 additions & 1 deletion src/app/chat/chat-entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@ import { Timers } from "app/timer-type";
import { WeaponEntityAttackType } from "app/weapons/weapon-attack-type";
import { AskellonEntity } from "app/station/askellon-entity";
import { CreepEntity } from "app/creep/creep-entity";
import { ITEM_WEP_NEOKATANA } from "resources/item-ids";
import { ITEM_WEP_NEOKATANA, ITEM_WEP_MINIGUN } from "resources/item-ids";
import { ResearchFactory } from "app/research/research-factory";
import { TECH_MINERALS_PROGRESS } from "resources/ability-ids";
import { ALIEN_FORCE_NAME, OBSERVER_FORCE_NAME } from "app/force/forces/force-names";
import { PlayerState } from "app/force/player-type";
import { PlayNewSoundOnUnit } from "lib/translators";
export class ChatEntity extends Entity {

private static instance: ChatEntity;
Expand Down Expand Up @@ -266,6 +268,11 @@ export class ChatEntity extends Entity {
CreateItem(ITEM_WEP_NEOKATANA, x, y);
});
}
else if (message == "-test minigun") {
GetPlayerCamLoc(player, (x, y) => {
CreateItem(ITEM_WEP_MINIGUN, x, y);
});
}
else if (message == "-cd") {
EnumUnitsSelected(player.handle, Filter(() => true), () => {
UnitResetCooldown(GetEnumUnit());
Expand Down Expand Up @@ -369,6 +376,22 @@ export class ChatEntity extends Entity {
else if (message === "-clear" || message === "-c") {
if (player.handle === GetLocalPlayer()) ClearTextMessages();
}
else if (message === "-lol" || message === "-l" || message === "-l") {
const pData = PlayerStateFactory.get(player);
const crew = PlayerStateFactory.getCrewmember(player);
if (crew && pData.getUnit() === crew.unit) {
const u = crew.unit;
if (u && u.typeId === CREWMEMBER_UNIT_ID) {
PlayNewSoundOnUnit("Sounds\\minigun_fullerauto_2.mp3", u, 60);
u.setAnimation(5);
const uX = u.x;
const uY = u.y;

Timers.addTimedAction(1.4, () => u.x == uX && u.y == uY && u.setAnimation(0));
}
}
if (player.handle === GetLocalPlayer()) ClearTextMessages();
}
else if (message === "-h" || message === "-handles" || message === "-p" || message === "-players") {
const pIsAlien = PlayerStateFactory.get(player).getForce().is(ALIEN_FORCE_NAME);
const isObserver = PlayerStateFactory.get(player).getForce().is(OBSERVER_FORCE_NAME);
Expand Down
6 changes: 6 additions & 0 deletions src/app/force/force-entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,12 @@ export class ForceEntity extends Entity {


Timers.addSlowTimedAction(15, () => {
// has only one force one?
const winningForces2 = PlayerStateFactory.getInstance().forces.filter(f => f.checkVictoryConditions());

if (winningForces2.length > 1) return;
if (winner !== winningForces2[0]) return;

if (winningPlayers.indexOf(MapPlayer.fromLocal()) >= 0) {
winningSound.playSound();
}
Expand Down
32 changes: 30 additions & 2 deletions src/app/force/forces/alien-force.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ import { ChatEntity } from "app/chat/chat-entity";
import { PlayerState } from "../player-type";
import { SFX_ALIEN_BLOOD } from "resources/sfx-paths";
import { CrewmemberForce } from "./crewmember-force";
import { MessagePlayer } from "lib/utils";
import { MessagePlayer, MessageAllPlayers } from "lib/utils";
import { Quick } from "lib/Quick";
import { UPGR_DUMMY_IS_ALIEN_HOST } from "resources/upgrade-ids";
import { ZONE_TYPE } from "app/world/zone-id";
import { GameTimeElapsed } from "app/types/game-time-elapsed";


export const MAKE_UNCLICKABLE = false;
Expand All @@ -54,6 +55,8 @@ export class AlienForce extends ForceType {
private alienDeathTrigs = new Map<Unit, Trigger>();
private alienKillsTrigger = new Trigger();

private isPickingAnotherAlienHost = false;

constructor() {
super();

Expand Down Expand Up @@ -308,9 +311,34 @@ export class AlienForce extends ForceType {
obsForce.addPlayerMainUnit(crew, player);
PlayerStateFactory.get(player).setForce(obsForce);

if (player === this.alienHost) {
if (player === this.alienHost && this.players.length > 0) {
this.repickHost();
}
// Otherwise if the game time is less than five minutes, pick a new host
else if (this.players.length === 0 && GameTimeElapsed.getTime() <= 5*60) {
const crewForce = PlayerStateFactory.getForce(CREW_FORCE_NAME) as CrewmemberForce;
if (crewForce.getPlayers().length > 1) {
this.isPickingAnotherAlienHost = true;
Timers.addTimedAction(10, () => {
// Lastly check the player count
if (crewForce.getPlayers().length <= 1) return;
MessageAllPlayers(`Alien died too early; Repicking ${COL_ALIEN}Alien Host|r.`);

const crwPlayers = crewForce.getPlayers();
const pickedPlayer = Quick.GetRandomFromArray(crwPlayers, 1)[0];

crewForce.removePlayer(pickedPlayer);

const crewPickedPlayer = PlayerStateFactory.getCrewmember(pickedPlayer);

PlayerStateFactory.get(pickedPlayer).setForce(this);
this.addPlayer(pickedPlayer);
this.addPlayerMainUnit(crewPickedPlayer, pickedPlayer);
this.repickHost();
this.isPickingAnotherAlienHost = false;
});
}
}
}
}

Expand Down
Loading

0 comments on commit eeff0cb

Please sign in to comment.