diff --git a/addons/sourcemod/configs/zombie_riot/fast_sensal_foolish.cfg b/addons/sourcemod/configs/zombie_riot/fast_sensal_foolish.cfg index 96d2a19eaf..d54f3a334c 100644 --- a/addons/sourcemod/configs/zombie_riot/fast_sensal_foolish.cfg +++ b/addons/sourcemod/configs/zombie_riot/fast_sensal_foolish.cfg @@ -1,6 +1,6 @@ "Waves" { - "difficulty" "Sensal" + "difficulty" "Easy Sensal" "gift_drop_chance_multiplier" "1.5" //50% more gifts "grigori_special_shop_logic" "1" //He always sells! "author_npcs" "Artvin" diff --git a/addons/sourcemod/configs/zombie_riot/giftitems.cfg b/addons/sourcemod/configs/zombie_riot/giftitems.cfg index ecf976d9fc..f79d7ddce3 100644 --- a/addons/sourcemod/configs/zombie_riot/giftitems.cfg +++ b/addons/sourcemod/configs/zombie_riot/giftitems.cfg @@ -1044,8 +1044,8 @@ } "208" { - "name" "Unused Giftitem 1" - "rarity" "-1" + "name" "Compressed Explosive" + "rarity" "1" } "209" { @@ -1077,4 +1077,24 @@ "name" "Sticky Full Burst" "rarity" "1" } + "215" + { + "name" "Modern Defense" + "rarity" "1" + } + "216" + { + "name" "Special Sandvich Recipe" + "rarity" "1" + } + "217" + { + "name" "Mortar Support" + "rarity" "1" + } + "218" + { + "name" "Grigori's Personal 12g Ammo" + "rarity" "1" + } } diff --git a/addons/sourcemod/configs/zombie_riot/weapons.cfg b/addons/sourcemod/configs/zombie_riot/weapons.cfg index eadebbb7ec..eb9eb4690a 100644 --- a/addons/sourcemod/configs/zombie_riot/weapons.cfg +++ b/addons/sourcemod/configs/zombie_riot/weapons.cfg @@ -846,7 +846,7 @@ "pap_2_lag_comp_extend_boundingbox" "1" "pap_2_lag_comp_dont_move_building" "0" "pap_2_weapon_archetype" "3" - "pap_2_int_ability_onequip" "1003" + "pap_2_int_ability_onequip" "1006" "pap_2_func_attack" "Weapon_Auto_Shotgun" "pap_2_reload_mode" "1" //1 means entire clip, 2 means one at a time. default is whatever the weapon had as a norm. "pap_2_pappaths" "1" // Paps 1 - 2 @@ -935,7 +935,7 @@ "pap_6_lag_comp_extend_boundingbox" "1" "pap_6_lag_comp_dont_move_building" "0" "pap_6_weapon_archetype" "3" - "pap_6_int_ability_onequip" "1003" + "pap_6_int_ability_onequip" "1006" "pap_6_func_attack" "Weapon_Auto_Shotgun" "pap_6_reload_mode" "1" //1 means entire clip, 2 means one at a time. default is whatever the weapon had as a norm. @@ -956,7 +956,7 @@ "pap_7_lag_comp_extend_boundingbox" "1" "pap_7_lag_comp_dont_move_building" "0" "pap_7_weapon_archetype" "3" - "pap_7_int_ability_onequip" "1003" + "pap_7_int_ability_onequip" "1006" "pap_7_func_attack" "Weapon_Auto_Shotgun" "pap_7_reload_mode" "1" //1 means entire clip, 2 means one at a time. default is whatever the weapon had as a norm. @@ -977,7 +977,7 @@ "pap_8_lag_comp_extend_boundingbox" "1" "pap_8_lag_comp_dont_move_building" "0" "pap_8_weapon_archetype" "3" - "pap_8_int_ability_onequip" "1003" + "pap_8_int_ability_onequip" "1006" "pap_8_func_attack" "Weapon_Auto_Shotgun" "pap_8_reload_mode" "1" //1 means entire clip, 2 means one at a time. default is whatever the weapon had as a norm. "pap_8_pappaths" "1" // Paps 1 - 2 @@ -2416,6 +2416,7 @@ "index" "45" "attributes" "205 ; 0.9 ; 206 ; 0.9 ; 809 ; 1 ; 4 ; 0.15 ; 43 ; 1 ; 2 ; 8 ; 45 ; 2 ; 97 ; 1.0 ; 6 ; 1.0 ; 106 ; 1.0 ; 4014 ; 1.0" "ammo" "20" //Shotgun ammo + "int_ability_onequip" "1003" @@ -2438,6 +2439,7 @@ "pap_1_index" "45" "pap_1_attributes" "205 ; 0.9 ; 206 ; 0.9 ; 809 ; 1 ; 4 ; 0.15 ; 43 ; 1 ; 2 ; 15 ; 45 ; 2 ; 6 ; 0.9 ; 97 ; 0.9 ; 106 ; 1.0 ; 4014 ; 1.0" "pap_1_ammo" "20" //Shotgun ammo + "pap_1_int_ability_onequip" "1003" @@ -2459,6 +2461,7 @@ "pap_2_index" "45" "pap_2_attributes" "205 ; 0.9 ; 206 ; 0.9 ; 809 ; 1 ; 4 ; 0.33 ; 43 ; 1 ; 2 ; 30 ; 45 ; 2 ; 6 ; 0.7 ; 97 ; 0.85 ; 106 ; 1.0 ; 4014 ; 1.0" "pap_2_ammo" "20" //Shotgun ammo + "pap_2_int_ability_onequip" "1003" @@ -2480,6 +2483,7 @@ "pap_3_index" "45" "pap_3_attributes" "205 ; 0.9 ; 206 ; 0.9 ; 809 ; 1 ; 4 ; 0.33 ; 43 ; 1 ; 2 ; 60 ; 45 ; 2 ; 6 ; 0.65 ; 97 ; 0.75 ; 106 ; 1.0 ; 4014 ; 1.0 ; 4021 ; 3 ; 542 ; 1" "pap_3_ammo" "20" //Shotgun ammo + "pap_3_int_ability_onequip" "1003" @@ -19273,7 +19277,6 @@ { "desc" "Inv Call Dev desc" "cost" "0" - "slot" "5" "filter" "private" "textstore" "Overwritten giftitems cfg" } @@ -19283,7 +19286,7 @@ { "cost" "0" "whiteout" "1" - "filter" "realtime" + "filter" "private" } "Slug Shell Pouch" { @@ -19319,6 +19322,15 @@ "filter" "private" "textstore" "12g Mini Shell Pouch" } + "Grigori's Personal 12g Ammo" + { + "desc" "Inv Grigori's Personal 12g Ammo desc" + "author" "Baka" + "cost" "0" + "slot" "0" + "filter" "private" + "textstore" "Grigori's Personal 12g Ammo" + } "Rose of SelfHarm" { "desc" "Inv Rose of SelfHarm desc" @@ -19374,6 +19386,33 @@ "filter" "private" "textstore" "Sticky Full Burst" } + "Compressed Explosive" + { + "desc" "Inv Compressed Explosive desc" + "author" "Baka" + "cost" "0" + "special_attribute" "1021" + "filter" "private" + "textstore" "Compressed Explosive" + } + "Modern Defense" + { + "desc" "Inv Modern Defense desc" + "author" "Baka" + "cost" "0" + "slot" "2" + "filter" "private" + "textstore" "Modern Defense" + } + "Mortar Support" + { + "desc" "Inv Mortar Support desc" + "author" "Baka" + "cost" "0" + "slot" "2" + "filter" "private" + "textstore" "Mortar Support" + } } "Challenge" { @@ -19381,7 +19420,7 @@ { "cost" "0" "whiteout" "1" - "filter" "realtime" + "filter" "private" } "Glass Coil" { @@ -19396,6 +19435,16 @@ "filter" "private" "textstore" "Glass Coil" } + "Special Sandvich Recipe" + { + "desc" "Inv Special Sandvich Recipe desc" + "extra_desc" "Inv Special Sandvich Recipe desc Extra" + "author" "Baka" + "cost" "0" + "slot" "1" + "filter" "private" + "textstore" "Special Sandvich Recipe" + } } "Challenge Completed" { @@ -19403,7 +19452,7 @@ { "cost" "0" "whiteout" "1" - "filter" "realtime" + "filter" "private" } "Chaos Coil" { @@ -19416,6 +19465,16 @@ "filter" "private" "textstore" "Chaos Coil" } + "Little Sandvich SafeHouse" + { + "desc" "Inv Little Sandvich SafeHouse desc" + "author" "Baka" + "cost" "0" + "special_attribute" "1001" + "slot" "1" + "filter" "private" + "textstore" "Little Sandvich SafeHouse" + } } } } diff --git a/addons/sourcemod/scripting/zombie_riot/custom/addons/special_inventory.sp b/addons/sourcemod/scripting/zombie_riot/custom/addons/special_inventory.sp index 789b727215..8a347195d3 100644 --- a/addons/sourcemod/scripting/zombie_riot/custom/addons/special_inventory.sp +++ b/addons/sourcemod/scripting/zombie_riot/custom/addons/special_inventory.sp @@ -21,12 +21,16 @@ bool Inv_GalssCoil[MAXPLAYERS]; bool Inv_SuperFocusLens[MAXPLAYERS]; bool Inv_ExperimentalReactor[MAXPLAYERS]; bool Inv_StickyFullBurst[MAXPLAYERS]; +bool Inv_CompressedExplosive[MAXPLAYERS]; float Inv_Nailgun_Slug_Ammo[MAXPLAYERS]; float Inv_Chaos_Coil_Delay[MAXPLAYERS]; +int Inv_SpecialSandvichProgress[MAXPLAYERS]; int Inv_ChaosticGlass[MAXPLAYERS]; int Inv_Chaos_Coil[MAXPLAYERS]; int Inv_Box_Office_Max[MAXPLAYERS]; +static float PreventSameFrameGivearmor[MAXPLAYERS]; + public void Custom_Inventory_Reset(int client) { /*초기화*/ @@ -49,6 +53,7 @@ public void Custom_Inventory_Reset(int client) Inv_SuperFocusLens[client]=false; Inv_ExperimentalReactor[client]=false; Inv_StickyFullBurst[client]=false; + Inv_CompressedExplosive[client]=false; if(Inv_Chaos_Coil[client]) { int Chaos_Coil = EntRefToEntIndex(Inv_Chaos_Coil[client]); @@ -101,6 +106,7 @@ stock bool Custom_Inventory_Enable(int client, int entity, int Attribute) case 1018:Inv_SuperFocusLens[client]=true; case 1019:Inv_ExperimentalReactor[client]=true; case 1020:Inv_StickyFullBurst[client]=true; + case 1021:Inv_CompressedExplosive[client]=true; } return false; } @@ -123,7 +129,7 @@ public void Custom_Inventory_Attribute(int client, int weapon) { switch(i_CustomWeaponEquipLogic[weapon]) { - case WEAPON_BOOMSTICK, WEAPON_IS_SHOTGUN: + case WEAPON_BOOMSTICK, WEAPON_IS_SHOTGUN, WEAPON_ANGELIC_SHOTGUN, WEAPON_IS_AUTOSHOTGUN: { if(ExtraPellets) { @@ -193,6 +199,23 @@ public void Custom_Inventory_Attribute(int client, int weapon) else i_WeaponDamageFalloff[weapon]-=0.01; } + if(Store_HasNamedItem(client, "Grigori's Personal 12g Ammo")) + { + if(!Attributes_Has(weapon, 2)) + Attributes_Set(weapon, 2, 1.0); + if(!Attributes_Has(weapon, Attrib_ArmorOnHitMax)) + Attributes_Set(weapon, Attrib_ArmorOnHitMax, 1.0); + Attributes_SetMulti(weapon, 2, 0.8); + switch(i_CustomWeaponEquipLogic[weapon]) + { + case WEAPON_BOOMSTICK: + Attributes_Set(weapon, Attrib_ArmorOnHitMax, 0.0); + case WEAPON_IS_AUTOSHOTGUN: + Attributes_SetMulti(weapon, Attrib_ArmorOnHitMax, 0.025); + default: + Attributes_SetMulti(weapon, Attrib_ArmorOnHitMax, 0.1); + } + } } if(i_CustomWeaponEquipLogic[weapon]==WEAPON_IS_HPR && Inv_ExperimentalReactor[client]) { @@ -202,17 +225,19 @@ public void Custom_Inventory_Attribute(int client, int weapon) } if(i_CustomWeaponEquipLogic[weapon]==WEAPON_IS_STICKYBOMB && Inv_StickyFullBurst[client]) Attributes_Set(weapon, 119, 0.0); + if(i_CustomWeaponEquipLogic[weapon]==WEAPON_VICTORIAN_LAUNCHER && Inv_CompressedExplosive[client]) + Attributes_SetMulti(weapon, 99, 1.33); } public void Custom_Inventory_WaveEnd(int client) { + int ThisWave = Waves_GetRoundScale()+1; if(!StrContains(WhatDifficultySetting_Internal, "Interitus Group")) { bool Chaostic = view_as(Store_HasNamedItem(client, "Glass Coil")); if(Chaostic) { Inv_ChaosticGlass[client]++; - int ThisWave = Waves_GetRoundScale()+1; if(Inv_ChaosticGlass[client]>=46 && (ThisWave==40 || (ThisWave>=0 && ThisWave<=1)) &&!(Items_HasNamedItem(client, "Chaos Coil"))) { Items_GiveNamedItem(client, "Chaos Coil"); @@ -222,6 +247,29 @@ public void Custom_Inventory_WaveEnd(int client) else Inv_ChaosticGlass[client]=0; } + if(!StrContains(WhatDifficultySetting_Internal, "Sensal")) + { + bool bSandvich = view_as(Store_HasNamedItem(client, "Special Sandvich Recipe")); + int building = EntRefToEntIndex(i_PlayerToCustomBuilding[client]); + if(building != -1) + { + if(bSandvich && Merchant_IsAMerchant(client) && StrEqual(c_NpcName[building], "Merchant Grill")) + { + Inv_SpecialSandvichProgress[client]++; + if(Inv_SpecialSandvichProgress[client]>=44 && (ThisWave==40 || (ThisWave>=0 && ThisWave<=1)) &&!(Items_HasNamedItem(client, "Little Sandvich SafeHouse"))) + { + Items_GiveNamedItem(client, "Little Sandvich SafeHouse"); + CPrintToChat(client, "%t", "Inv Little Sandvich SafeHouse Give"); + } + } + else + Inv_SpecialSandvichProgress[client]=0; + } + else + Inv_SpecialSandvichProgress[client]=0; + PrintToChat(client, "get points %i", Inv_SpecialSandvichProgress[client]); + } + PrintToChat(client, "WaveEnd"); Inv_Box_Office_Max[client]=0; } @@ -321,8 +369,36 @@ public float Custom_Inventory_NPCOnTakeDamage(int victim, int attacker, int infl float YPOS = GetVectorDistance(attackerPos, victimPos); if(YPOS>100.0) damage *= 1.10; } + if(Store_HasNamedItem(attacker, "Grigori's Personal 12g Ammo")) + { + float value = Attributes_Get(weapon, Attrib_ArmorOnHitMax, 0.0); + if(PreventSameFrameGivearmor[attacker] == GetGameTime()) + value = 0.0; + + if(value) + { + PreventSameFrameGivearmor[attacker] = GetGameTime(); + if(b_thisNpcIsARaid[victim]) + value *= 2.0; + + float attackerPos[3], victimPos[3]; + GetEntPropVector(attacker, Prop_Send, "m_vecOrigin", attackerPos); + GetEntPropVector(victim, Prop_Send, "m_vecOrigin", victimPos); + float Dist = GetVectorDistance(attackerPos, victimPos, true); + if(Dist<202500.0) //450*450 + { + float WeaponDamageFalloff = i_WeaponDamageFalloff[weapon]; + if(b_ProximityAmmo[attacker]) + WeaponDamageFalloff *= 0.8; + if(f_TimeUntillNormalHeal[attacker] > GetGameTime()) + value *= 0.25; + + value = value*Pow(WeaponDamageFalloff, (Dist/160000.0)); //400*400 + GiveArmorViaPercentage(attacker, value, 0.5); + } + } + } } - return damage; } @@ -342,7 +418,7 @@ bool Custom_Inventory_IsShotgun(int weapon) { switch(i_CustomWeaponEquipLogic[weapon]) { - case WEAPON_BOOMSTICK, WEAPON_IS_SHOTGUN, WEAPON_NAILGUN_SHOTGUN:return true; + case WEAPON_BOOMSTICK, WEAPON_IS_SHOTGUN, WEAPON_NAILGUN_SHOTGUN, WEAPON_ANGELIC_SHOTGUN, WEAPON_IS_AUTOSHOTGUN:return true; case WEAPON_RIOT_SHIELD: { if(Attributes_Has(weapon, 45)) @@ -359,7 +435,7 @@ float Custom_Inventory_Falloff(int attacker, int weapon) { switch(i_CustomWeaponEquipLogic[weapon]) { - case WEAPON_BOOMSTICK, WEAPON_IS_SHOTGUN, WEAPON_NAILGUN_SHOTGUN:return 0.77; + case WEAPON_BOOMSTICK, WEAPON_IS_SHOTGUN, WEAPON_NAILGUN_SHOTGUN, WEAPON_ANGELIC_SHOTGUN, WEAPON_IS_AUTOSHOTGUN:return 0.77; case WEAPON_RIOT_SHIELD: { if(Attributes_Has(weapon, 45)) @@ -371,7 +447,7 @@ float Custom_Inventory_Falloff(int attacker, int weapon) { switch(i_CustomWeaponEquipLogic[weapon]) { - case WEAPON_BOOMSTICK, WEAPON_IS_SHOTGUN, WEAPON_NAILGUN_SHOTGUN:return 0.83; + case WEAPON_BOOMSTICK, WEAPON_IS_SHOTGUN, WEAPON_NAILGUN_SHOTGUN, WEAPON_ANGELIC_SHOTGUN, WEAPON_IS_AUTOSHOTGUN:return 0.83; case WEAPON_RIOT_SHIELD: { if(Attributes_Has(weapon, 45)) diff --git a/addons/sourcemod/scripting/zombie_riot/custom/kit_blacksmith_grill.sp b/addons/sourcemod/scripting/zombie_riot/custom/kit_blacksmith_grill.sp index fde3360eae..0a2ede37b7 100644 --- a/addons/sourcemod/scripting/zombie_riot/custom/kit_blacksmith_grill.sp +++ b/addons/sourcemod/scripting/zombie_riot/custom/kit_blacksmith_grill.sp @@ -73,6 +73,17 @@ void BlacksmithGrill_NPCTakeDamagePost(int victim, int attacker, float damage) { if(attacker <= MaxClients && Merchant_IsAMerchant(attacker) && IsValidEntity(i_PlayerToCustomBuilding[attacker])) { + bool bSandvich = view_as(Store_HasNamedItem(attacker, "Special Sandvich Recipe")); + if(bSandvich) + { + if(InMenu[attacker]) + { + char buffer[64]; + FormatEx(buffer, sizeof(buffer), "%t", "Inv Special Sandvich Recipe desc for grill"); + GrillingMenu(attacker, buffer); + } + return; + } int random = RandomSeed + i_NpcInternalId[victim]; int sauce = random % S_Special; diff --git a/addons/sourcemod/scripting/zombie_riot/custom/weapon_boom_stick.sp b/addons/sourcemod/scripting/zombie_riot/custom/weapon_boom_stick.sp index 8228907577..f55f8ef527 100644 --- a/addons/sourcemod/scripting/zombie_riot/custom/weapon_boom_stick.sp +++ b/addons/sourcemod/scripting/zombie_riot/custom/weapon_boom_stick.sp @@ -13,6 +13,9 @@ void BoomStick_MapPrecache() public void Weapon_Boom_Stick(int client, int weapon, bool crit, int slot) { float Ratio = BoomstickAdjustDamageAndAmmoCount(weapon, 4); + + if(Store_HasNamedItem(client, "Grigori's Personal 12g Ammo")) + Attributes_Set(weapon, Attrib_ArmorOnHitMax, 0.15*Ratio); if(!TF2_IsPlayerInCondition(client, TFCond_RuneHaste)) { @@ -61,6 +64,9 @@ public void Weapon_Boom_Stick(int client, int weapon, bool crit, int slot) public void Weapon_Boom_Stick_Louder(int client, int weapon, bool crit, int slot) { float Ratio = BoomstickAdjustDamageAndAmmoCount(weapon, 6); + + if(Store_HasNamedItem(client, "Grigori's Personal 12g Ammo")) + Attributes_Set(weapon, Attrib_ArmorOnHitMax, 0.2*Ratio); if(!TF2_IsPlayerInCondition(client, TFCond_RuneHaste)) { @@ -109,6 +115,9 @@ public void Weapon_Boom_Stick_Louder(int client, int weapon, bool crit, int slot public void Weapon_Boom_Stick_Loudest(int client, int weapon, bool crit, int slot) { float Ratio = BoomstickAdjustDamageAndAmmoCount(weapon, 8); + + if(Store_HasNamedItem(client, "Grigori's Personal 12g Ammo")) + Attributes_Set(weapon, Attrib_ArmorOnHitMax, 0.25*Ratio); if(!TF2_IsPlayerInCondition(client, TFCond_RuneHaste)) { @@ -185,6 +194,9 @@ public void Marksman_boom_rifle(int client, int weapon, bool crit, int slot) public void Weapon_Boom_Stick_Louder_Laser(int client, int weapon, bool crit, int slot) { float Ratio = BoomstickAdjustDamageAndAmmoCount(weapon, 6); + + if(Store_HasNamedItem(client, "Grigori's Personal 12g Ammo")) + Attributes_Set(weapon, Attrib_ArmorOnHitMax, 0.2*Ratio); if(!TF2_IsPlayerInCondition(client, TFCond_RuneHaste)) { @@ -257,7 +269,7 @@ public void Weapon_Boom_Stick_Louder_Laser(int client, int weapon, bool crit, in color = {255, 65, 15, 80}; float angles[3]; GetClientEyeAngles(client, angles); - Laser.DoForwardTrace_Custom(angles, Origin, 450.0); + Laser.DoForwardTrace_Custom(angles, Origin, 250.0); damage*=10.0; PlayerLaserDoDamageCombined(Laser, damage, damage); DoPlayerLaserEffectsBigger(Laser, color); diff --git a/addons/sourcemod/scripting/zombie_riot/object/obj_barracks.sp b/addons/sourcemod/scripting/zombie_riot/object/obj_barracks.sp index 9006d97c0f..6847845870 100644 --- a/addons/sourcemod/scripting/zombie_riot/object/obj_barracks.sp +++ b/addons/sourcemod/scripting/zombie_riot/object/obj_barracks.sp @@ -258,6 +258,8 @@ void ObjectBarracks_MapStart() PrecacheModel(SUMMONER_MODEL); PrecacheModel(SUMMONER_MODEL_2); PrecacheModel(SUMMONER_MODEL_3); + PrecacheSound("weapons/sniper_shoot.wav"); + PrecacheSound("weapons/grenade_launcher_shoot.wav"); NPCData data; strcopy(data.Name, sizeof(data.Name), "Barracks"); @@ -1170,7 +1172,7 @@ void Barracks_BuildingThink(int entity) DoHealingOcean(entity, entity, (500.0 * 500.0), 0.5, true); } } - if(IsValidEnemy(client, ValidEnemyToTarget)) + if(Barracks_ModeManager(npc, client, mounted, pos, GameTime) && IsValidEnemy(client, ValidEnemyToTarget)) { if(npc.m_flNextMeleeAttack < GameTime) { @@ -1309,7 +1311,313 @@ void Barracks_BuildingThink(int entity) i_BuildingReceivedHordings[player.m_iTowerLinked] = true; } } -} +} + +static bool Barracks_ModeManager(BarrackBody npc, int client, bool mounted, float SelfPos[3], float GameTime) +{ + if(Store_HasNamedItem(client, "Modern Defense")) + { + Barracks_ModernDefense_Mode(npc, client, mounted, SelfPos, GameTime); + return false; + } + if(Store_HasNamedItem(client, "Mortar Support")) + { + Barracks_MortarSupport_Mode(npc, client, mounted, SelfPos, GameTime); + return false; + } + return true; +} + +static void Barracks_MortarSupport_Mode(BarrackBody npc, int client, bool mounted, float SelfPos[3], float GameTime) +{ + int MortarLeveL = 0; + float BlastDamage = 500.0; + float BlastRange = EXPLOSION_RADIUS; + float AttackDelay = 10.0; + float projectile_speed = 1100.0; + float MaximumDistance = 700.0; + float MinimumDistance = 500.0; + + if(i_NormalBarracks_HexBarracksUpgrades[client] & ZR_BARRACKS_UPGRADES_CASTLE) + MortarLeveL = 5; + else if(i_NormalBarracks_HexBarracksUpgrades[client] & ZR_BARRACKS_UPGRADES_KREPOST) + MortarLeveL = 4; + else if(i_NormalBarracks_HexBarracksUpgrades[client] & ZR_BARRACKS_UPGRADES_DONJON) + MortarLeveL = 3; + else if(i_NormalBarracks_HexBarracksUpgrades[client] & ZR_BARRACKS_UPGRADES_BALLISTICAL_TOWER) + MortarLeveL = 2; + else if(i_NormalBarracks_HexBarracksUpgrades[client] & ZR_BARRACKS_UPGRADES_IMPERIAL_TOWER) + MortarLeveL = 1; + switch(MortarLeveL) + { + case 1: BlastDamage = 1500.0; + case 2: + { + BlastDamage = 4000.0; + MaximumDistance = 1000.0; + } + case 3: BlastDamage = 9000.0; + case 4: BlastDamage = 17500.0; + case 5: + { + BlastDamage = 41000.0; + MaximumDistance = 1500.0; + } + } + + if(i_NormalBarracks_HexBarracksUpgrades[client] & ZR_BARRACKS_UPGRADES_MURDERHOLES) + MinimumDistance *= 0.77; + + MaximumDistance = Barracks_UnitExtraRangeCalc(npc.index, client, MaximumDistance, true); + + if(i_NormalBarracks_HexBarracksUpgrades[client] & ZR_BARRACKS_UPGRADES_CRENELLATIONS) + projectile_speed *= 1.5; + + if(i_NormalBarracks_HexBarracksUpgrades[client] & ZR_BARRACKS_UPGRADES_CHEMISTY) + BlastDamage *= 1.25; + if(mounted) + BlastDamage *= 0.5; + else + SelfPos[2]+=45.0; + + if(i_NormalBarracks_HexBarracksUpgrades[client] & ZR_BARRACKS_UPGRADES_STRONGHOLDS) + AttackDelay *= 0.85; + if(Store_HasNamedItem(client, "Dubious Cheesy Ideas")) + { + BlastDamage *= 1.25; + BlastRange *= 1.1; + } + if(Store_HasNamedItem(client, "Messed Up Cheesy Brain")) + { + BlastDamage *= 1.35; + BlastRange *= 1.25; + } + + Barracks_UnitExtraDamageCalc(npc.index, client, BlastDamage, 1); + + if(npc.m_flNextMeleeAttack < GameTime) + { + int Target = GetClosestTarget((mounted ? client : npc.index), true, MaximumDistance, true, _, _ ,SelfPos, true,_,_,true, (MinimumDistance * MinimumDistance)); + if(IsValidEnemy(client, Target)) + { + float vecTarget[3]; + if(i_NormalBarracks_HexBarracksUpgrades[client] & ZR_BARRACKS_UPGRADES_BALLISTICS) + { + BarrackBody playerclient = view_as(client); + PredictSubjectPositionForProjectiles(mounted ? playerclient : npc, Target, projectile_speed, 55.0,vecTarget); + if(!Can_I_See_Enemy_Only(mounted ? client : npc.index, Target)) //cant see enemy in the predicted position, we will instead just attack normally + WorldSpaceCenter(Target, vecTarget); + } + else WorldSpaceCenter(Target, vecTarget); + + float SpeedReturn[3]; + int RocketGet = npc.FireRocket(vecTarget, 0.0, projectile_speed,_,_,_,45.0); + if(RocketGet != -1) + { + ArcToLocationViaSpeedProjectile(SelfPos, vecTarget, SpeedReturn, 1.75, 1.0); + TeleportEntity(RocketGet, NULL_VECTOR, NULL_VECTOR, SpeedReturn); + Better_Gravity_Rocket(RocketGet, 55.0); + fl_Extra_Damage[RocketGet] = BlastDamage; + fl_Dead_Ringer_Invis[RocketGet] = BlastRange; + SDKHook(RocketGet, SDKHook_StartTouch, HEGrenade_StartTouch); + } + EmitSoundToAll("weapons/grenade_launcher_shoot.wav", (mounted ? client : npc.index), _, 80, _, 0.7); + npc.m_flNextMeleeAttack = GameTime + AttackDelay; + } + } +} + +static Action HEGrenade_StartTouch(int entity, int target) +{ + int owner = GetEntPropEnt(entity, Prop_Send, "m_hOwnerEntity"); + if(!IsValidEntity(owner)) + owner = 0; + int inflictor = h_ArrowInflictorRef[entity]; + if(inflictor != -1) + inflictor = EntRefToEntIndex(h_ArrowInflictorRef[entity]); + + if(inflictor == -1) + inflictor = owner; + + float ProjectileLoc[3]; + GetEntPropVector(entity, Prop_Data, "m_vecAbsOrigin", ProjectileLoc); + Explode_Logic_Custom(fl_Extra_Damage[entity], owner, inflictor, -1, ProjectileLoc, fl_Dead_Ringer_Invis[entity]); + return Plugin_Handled; +} + +static void Barracks_ModernDefense_Mode(BarrackBody npc, int client, bool mounted, float SelfPos[3], float GameTime) +{ + int ModernLeveL = 0; + int MaxAmmo = 13; + float BulletDamage = 13.0; + float AttackDelay = 0.3; + float ReloadDelay = 1.5; + float MaximumDistance = 250.0; + + if(i_NormalBarracks_HexBarracksUpgrades[client] & ZR_BARRACKS_UPGRADES_CASTLE) + ModernLeveL = 5; + else if(i_NormalBarracks_HexBarracksUpgrades[client] & ZR_BARRACKS_UPGRADES_KREPOST) + ModernLeveL = 4; + else if(i_NormalBarracks_HexBarracksUpgrades[client] & ZR_BARRACKS_UPGRADES_DONJON) + ModernLeveL = 3; + else if(i_NormalBarracks_HexBarracksUpgrades[client] & ZR_BARRACKS_UPGRADES_BALLISTICAL_TOWER) + ModernLeveL = 2; + else if(i_NormalBarracks_HexBarracksUpgrades[client] & ZR_BARRACKS_UPGRADES_IMPERIAL_TOWER) + ModernLeveL = 1; + switch(ModernLeveL) + { + case 1: + { + MaxAmmo = 18; + BulletDamage = 50.2; + MaximumDistance = 300.0; + } + case 2: + { + MaxAmmo = 31; + BulletDamage = 95.5; + AttackDelay = 0.2; + ReloadDelay = 3.75; + MaximumDistance = 400.0; + } + case 3: + { + MaxAmmo = 41; + BulletDamage = 170.5; + AttackDelay = 0.2; + ReloadDelay = 3.75; + MaximumDistance = 450.0; + } + case 4: + { + MaxAmmo = 50; + BulletDamage = 300.0; + AttackDelay = 0.1; + ReloadDelay = 8.75; + MaximumDistance = 450.0; + } + case 5: + { + MaxAmmo = 50; + BulletDamage = 720.0; + AttackDelay = 0.1; + ReloadDelay = 7.0; + MaximumDistance = 500.0; + } + } + + if(i_NormalBarracks_HexBarracksUpgrades[client] & ZR_BARRACKS_UPGRADES_MURDERHOLES) + MaximumDistance *= 1.15; + + MaximumDistance = Barracks_UnitExtraRangeCalc(npc.index, client, MaximumDistance, true); + + if(i_NormalBarracks_HexBarracksUpgrades[client] & ZR_BARRACKS_UPGRADES_BALLISTICS) + ReloadDelay *= 0.8; + + if(i_NormalBarracks_HexBarracksUpgrades[client] & ZR_BARRACKS_UPGRADES_CHEMISTY) + BulletDamage *= 1.25; + if(mounted) + BulletDamage *= 0.5; + else + SelfPos[2]+=45.0; + + if(i_NormalBarracks_HexBarracksUpgrades[client] & ZR_BARRACKS_UPGRADES_STRONGHOLDS) + AttackDelay *= 0.85; + if(Store_HasNamedItem(client, "Dubious Cheesy Ideas")) + { + BulletDamage *= 1.25; + AttackDelay *= 0.9; + } + if(Store_HasNamedItem(client, "Messed Up Cheesy Brain")) + { + BulletDamage *= 1.35; + AttackDelay *= 0.75; + } + + Barracks_UnitExtraDamageCalc(npc.index, client, BulletDamage, 1); + + npc.m_iMaxAmmo = MaxAmmo; + if(npc.m_flReloadIn) + { + if(GameTime > npc.m_flReloadIn) + { + npc.m_iAmmo=npc.m_iMaxAmmo; + npc.m_flReloadIn = 0.0; + } + } + else if(npc.m_iAmmo < 1) + npc.m_flReloadIn = GameTime + ReloadDelay; + else if(npc.m_flNextMeleeAttack < GameTime) + { + int Target = GetClosestTarget((mounted ? client : npc.index), true, MaximumDistance, true, _, _ ,SelfPos, true,_,_,true); + if(IsValidEnemy(client, Target)) + { + float vecTarget[3]; WorldSpaceCenter(Target, vecTarget); + ShootLaser(npc.index, "bullet_tracer02_red", SelfPos, vecTarget, false); + SDKHooks_TakeDamage(Target, npc.index, npc.index, BulletDamage, DMG_BULLET, -1, _, vecTarget); + npc.m_iAmmo--; + switch(ModernLeveL) + { + case 1: EmitSoundToAll("weapons/pistol/pistol_fire2.wav", (mounted ? client : npc.index), _, 80, _, 0.7); + case 2, 3: EmitSoundToAll("weapons/smg1/smg1_fire1.wav", (mounted ? client : npc.index), _, 80, _, 0.7); + case 4, 5: EmitSoundToAll("weapons/ar2/fire1.wav", (mounted ? client : npc.index), _, 80, _, 0.7); + default: EmitSoundToAll("weapons/pistol/pistol_fire2.wav", (mounted ? client : npc.index), _, 80, _, 0.7); + } + npc.m_flNextMeleeAttack = GameTime + AttackDelay; + } + } + + if(npc.m_flNextRangedAttack < GameTime && i_NormalBarracks_HexBarracksUpgrades[client] & ZR_BARRACKS_UPGRADES_CRENELLATIONS) + { + float MinimumDistance = 300.0; + switch(ModernLeveL) + { + case 1: {BulletDamage = 1000.0; MaximumDistance = 700.0;} + case 2: {BulletDamage = 3000.0; MaximumDistance = 800.0;} + case 3: {BulletDamage = 7200.0; MaximumDistance = 900.0;} + case 4: {BulletDamage = 15000.0; MaximumDistance = 1000.0;} + case 5: {BulletDamage = 36000.0; MaximumDistance = 1100.0;} + default: {BulletDamage = 200.0; MaximumDistance = 600.0;} + } + + + MaximumDistance = Barracks_UnitExtraRangeCalc(npc.index, client, MaximumDistance, true); + + if(i_NormalBarracks_HexBarracksUpgrades[client] & ZR_BARRACKS_UPGRADES_CHEMISTY) + BulletDamage *= 1.25; + if(mounted) + BulletDamage *= 0.5; + AttackDelay = 10.0; + if(i_NormalBarracks_HexBarracksUpgrades[client] & ZR_BARRACKS_UPGRADES_STRONGHOLDS) + AttackDelay *= 0.77; + if(i_NormalBarracks_HexBarracksUpgrades[client] & ZR_BARRACKS_UPGRADES_BALLISTICS) + AttackDelay *= 0.8; + if(Store_HasNamedItem(client, "Dubious Cheesy Ideas")) + { + BulletDamage *= 1.25; + AttackDelay *= 0.9; + } + if(Store_HasNamedItem(client, "Messed Up Cheesy Brain")) + { + BulletDamage *= 1.35; + AttackDelay *= 0.75; + } + Barracks_UnitExtraDamageCalc(npc.index, client,BulletDamage, 1); + + if(i_NormalBarracks_HexBarracksUpgrades[client] & ZR_BARRACKS_UPGRADES_MURDERHOLES) + MinimumDistance = 0.0; + + int Target = GetClosestTarget((mounted ? client : npc.index), true, MaximumDistance, true, _, _ ,SelfPos, true,_,_,true, (MinimumDistance * MinimumDistance)); + if(IsValidEnemy(client, Target)) + { + float vecTarget[3]; WorldSpaceCenter(Target, vecTarget); + ShootLaser(npc.index, "bullet_tracer02_red_crit", SelfPos, vecTarget, false); + SDKHooks_TakeDamage(Target, npc.index, npc.index, BulletDamage, DMG_BULLET, -1, _, vecTarget); + EmitSoundToAll("weapons/sniper_shoot.wav", (mounted ? client : npc.index), _, 80, _, 0.7); + npc.m_flNextRangedAttack = GameTime + AttackDelay; + } + } +} /* void BuildingHordingsRemoval(int entity) diff --git a/addons/sourcemod/scripting/zombie_riot/zr_core.sp b/addons/sourcemod/scripting/zombie_riot/zr_core.sp index 37c3a76f4c..1cb47b2ae2 100644 --- a/addons/sourcemod/scripting/zombie_riot/zr_core.sp +++ b/addons/sourcemod/scripting/zombie_riot/zr_core.sp @@ -289,7 +289,8 @@ enum WEAPON_MINECRAFT_SWORD = 1002, WEAPON_IS_SHOTGUN = 1003, WEAPON_IS_HPR = 1004, - WEAPON_IS_STICKYBOMB = 1005 + WEAPON_IS_STICKYBOMB = 1005, + WEAPON_IS_AUTOSHOTGUN = 1006 } enum diff --git a/addons/sourcemod/translations/zombieriot.phrases.foolishservers.txt b/addons/sourcemod/translations/zombieriot.phrases.foolishservers.txt index 7b20898f4c..66eae2d50b 100644 --- a/addons/sourcemod/translations/zombieriot.phrases.foolishservers.txt +++ b/addons/sourcemod/translations/zombieriot.phrases.foolishservers.txt @@ -263,8 +263,8 @@ } "Inv Super Focus Lens desc" { - "en" "Lasering Beamstick Only\nDamage increases by +1000%\nInstead, it becomes Single Laser\Laser Dist -50%, Laser Range -50%" - "ko" "레이저 빔스틱 전용\n피해량이 10배 증가합니다.\n대신 레이져는 직선으로 하나만 발사됩니다.\n사거리 -50%, 범위 -50%" + "en" "Lasering Beamstick Only\nDamage increases by +1000%\nInstead, it becomes Single Laser\Laser Dist -75%, Laser Range -50%" + "ko" "레이저 빔스틱 전용\n피해량이 10배 증가합니다.\n대신 레이져는 직선으로 하나만 발사됩니다.\n사거리 -75%, 범위 -50%" } "Barricade Stabilizer" { @@ -301,6 +301,46 @@ "en" "Stickybomb Launcher Only\nRemoved Detonates stickybombs near the crosshair and directly under your feet" "ko" "점착 폭탄 발사기 전용\n조준선 근처및 발밑 점착 폭탄 폭파 기능 제거" } + "Compressed Explosive" + { + "en" "Compressed Explosive" + "ko" "압축된 폭약" + } + "Inv Compressed Explosive desc" + { + "en" "Victorian Launcher Only\nIncreases Explosion Radius by 33%" + "ko" "빅토리아 런처 전용\n폭발 범위 +33%" + } + "Modern Defense" + { + "en" "Modern Defense" + "ko" "현대화 방어" + } + "Inv Modern Defense desc" + { + "en" "Barracks uses Hitscan instead of Projectiles." + "ko" "배럭이 투사체 대신 히트스캔을 사용합니다." + } + "Mortar Support" + { + "en" "Mortar Support" + "ko" "박격포 지원" + } + "Inv Mortar Support desc" + { + "en" "Barracks uses Explosive Projectiles." + "ko" "배럭이 폭발성 투사체를 사용합니다." + } + "Grigori's Personal 12g Ammo" + { + "en" "Grigori's Personal 12g Ammo" + "ko" "그리고리의 개인 소장용 12g 탄약" + } + "Inv Grigori's Personal 12g Ammo desc" + { + "en" "Multi Pellet Weapon Only\nGain armor per enemy hit upto half of your armor.\nIf recently hurt, its only 25%\Damage -20%" + "ko" "산탄 무기 전용\n적중시 아머를 회복하며 최대 아머의 절반까지 회복\n최근에 피해를 받았다면, 이 효과가 25%로 감소합니다.\n피해량 -20%" + } //인벤토리 첼린지 "Glass Coil" @@ -318,6 +358,26 @@ "en" "It is a Very Delicate Glass Coil\nIt seems to be affected by Chaos...\nWhen you progress through the Interitus Group waves from 0 to 30,\nyou will obtain New Items." "ko" "매우 섬세한 유리 코일 입니다\n혼돈에 영향을 받는것 같습니다...\n인테리투스 연합 웨이브를 0부터 40까지 진행하면 새로운 아이템을 흭득 합니다." } + "Special Sandvich Recipe" + { + "en" "Special Sandvich Recipe" + "ko" "특별한 샌드비치 레시피" + } + "Inv Special Sandvich Recipe desc" + { + "en" "Merchant Kit Only\nCannot be obtained Grill Sauces and Meats" + "ko" "상인 키트 전용\n그릴 재료 흭득 불가" + } + "Inv Special Sandvich Recipe desc Extra" + { + "en" "This is a special recipe.\nYou need all the ingredients...\nWhen you progress through the Sensal waves With Grill from 0 to 30,\nyou will obtain New Items." + "ko" "특별한 조합법입니다.\n모든 재료가 필요합니다...\n그릴과 함께 센살 웨이브를 0부터 40까지 진행하면 새로운 아이템을 흭득 합니다." + } + "Inv Special Sandvich Recipe desc for grill" + { + "en" "Cannot be obtained Grill Sauces and Meats" + "ko" "그릴 재료 흭득 불가" + } //인벤토리 트로피 "Chaos Coil" @@ -335,7 +395,6 @@ "en" "A terrible Chaos is contained within this Coil...\nIt feels like the coil is talking directly to my head..." "ko" "끔찍한 혼돈이 이 코일에 담겨 있습니다...\n코일이 머릿속에 직접 말을 거는듯한 기분이 듭니다..." } - "Little Sandvich SafeHouse" { "en" "Little Sandvich SafeHous" @@ -685,8 +744,13 @@ } "Inv Chaos Coil Give" { - "en" "The Glass Coil is consumed by {darkblue}Chaos{default}...\n{blue}''Chaos Coil [Rare]''{default}has been unlocked." - "ko" "유리 코일이 {darkblue}혼돈{default}에 침식됐습니다...\n{blue}''혼돈 코일 [희귀]''{default}이(가) 해금됐습니다." + "en" "The Glass Coil is consumed by {darkblue}Chaos{default}...\n{blue}''Chaos Coil''{default}has been unlocked." + "ko" "유리 코일이 {darkblue}혼돈{default}에 침식됐습니다...\n{blue}''혼돈 코일''{default}이(가) 해금됐습니다." + } + "Inv Little Sandvich SafeHouse Give" + { + "en" "We've put together a special recipe using all the ingredients!\n{community}''Little Sandvich SafeHous''{default}has been unlocked." + "ko" "모든 재료를 투입해 특별한 음식을 재작했습니다!\n{community}''작은 샌드비치 안전가옥''{default}이(가) 해금됐습니다." } "Pickup Gift Hero" { @@ -705,5 +769,4 @@ "en" "{crimson}[ZR]{snow} You have found!" "ko" "{crimson}[ZR]{snow} 아이템을 발견했습니다!" } - } \ No newline at end of file