Broom: Difference between revisions

From PZwiki
m (Correct categorising mistake.)
(added CodeBox, Condition and other fixes/updates/adjustments)
Line 1: Line 1:
{{languages|Broom}}
{{languages}}
{{Header|The Game World|Items|Weapons|Melee weapons|Blunt weapons|Long blunt weapons|type=Weapon|version=Version 41|incver=50}}
{{Header|The Game World|Items|Weapons|Melee weapons|Blunt weapons|Long blunt weapons|type=Weapon|version=Version 41|incver=78.16}}
{{Infobox weapon
{{Infobox weapon
|display_name=Broom
|display_name=Broom
Line 8: Line 8:
|image-width=200px
|image-width=200px
|alternate_image=Pushbroom.png
|alternate_image=Pushbroom.png
|category=Weapon
<!--GENERAL-->
|category=Household
|weight=1
|weight=1
|weapon_type=Blunt
|function=Cleaning
|primary_use=Weapon
|equipped=Two-handed
|equipped=Two-handed
|skill_type=Blunt
|attachment_type=Shovel
|condition_max=15
|condition_max=15
<!--DAMAGE-->
|type=Blunt
|type=Blunt
|swing_time=2
|base_speed=1.2
|min_range=0.61
|min_range=0.61
|max_range=1.6
|max_range=1.6
Line 22: Line 25:
|push_back=0.3
|push_back=0.3
|knockdown=0
|knockdown=0
<!--TECHNICAL-->
|class_name=Base.Broom
|class_name=Base.Broom
}}
}}
Line 34: Line 38:
=== Weapon ===
=== Weapon ===
A broom can be used as an improvised weapon. It has particularly low durability and damage, but can hit two zombies simultaneously and has longer than average maximum range.
A broom can be used as an improvised weapon. It has particularly low durability and damage, but can hit two zombies simultaneously and has longer than average maximum range.
==Condition==
The broom has a maximum condition of 3. Its rate of degradation is influenced by the [[Skills|long blunt]] and [[Skills|maintenance]] skills. The chance of losing [[durability]] can be simplified to the following formula: <code>1 in (2 + maintenanceMod &times; 2)</code>. Where "maintenanceMod" is calculated using the long blunt and maintenance skills.<br>
Below is an example of the chance of losing durability at varying levels of the [[Skills|maintenance]] and [[Skills|long blunt]] skills.
{{Durability weapon|2}}


== Distribution ==
== Distribution ==
Line 39: Line 48:


==Code==
==Code==
'''''From items_weapons.txt (Project Zomboid directory/media/scripts/)'''''
{{CodeBox
{{Retrieved|version=41|incver=50}}
| {{CodeSnip
<pre> item Broom
  | lang = java
MaxRange = 1.6,
  | line = true
WeaponSprite = Broom,
  | start = 2002
MinAngle = 0.85,
  | source = items_weapons.txt
Type = Weapon,
  | retrieved = true
MinimumSwingTime = 2,
  | version = 41
KnockBackOnNoDeath = FALSE,
  | incver = 78.16
SwingAmountBeforeImpact = 0.02,
  | code =
Categories = Improvised;Blunt,
    item Broom
ConditionLowerChanceOneIn = 2,
    {
Weight = 1,
        DisplayCategory = Household,
SplatNumber = 1,
        MaxRange = 1.6,
PushBackMod = 0.3,
        WeaponSprite = Broom,
SubCategory = Swinging,
        MinAngle = 0.85,
ConditionMax = 3,
        Type = Weapon,
MaxHitCount = 2,
        MinimumSwingTime = 2,
DoorDamage = 1,
        KnockBackOnNoDeath = FALSE,
SwingAnim = Bat,
        SwingAmountBeforeImpact = 0.02,
DisplayName = Broom,
        Categories = Improvised;Blunt,
MinRange = 0.61,
        ConditionLowerChanceOneIn = 2,
SwingTime = 2,
        Weight = 1,
KnockdownMod = 0,
        SplatNumber = 1,
SplatBloodOnNoDeath = FALSE,
        PushBackMod = 0.3,
Icon = Pushbroom,
        SubCategory = Swinging,
RunAnim = Run_Weapon2,
        ConditionMax = 3,
IdleAnim = Idle_Weapon2,
        MaxHitCount = 3,
BreakSound = BreakWoodItem,
        DoorDamage = 1,
TreeDamage = 0,
        SwingAnim = Bat,
TwoHandWeapon = TRUE,
        DisplayName = Broom,
CriticalChance = 5,
        MinRange = 0.61,
CritDmgMultiplier = 1,
        SwingTime = 2,
MinDamage = 0.2,
        KnockdownMod = 0,
MaxDamage = 0.5,
        SplatBloodOnNoDeath = FALSE,
BaseSpeed = 1.2,
        Icon = Pushbroom,
AttachmentType = Shovel,
        RunAnim = Run_Weapon2,
Tags = ClearAshes,
        IdleAnim = Idle_Weapon2,
</pre>
        BreakSound  =  BroomBreak,
        DoorHitSound = BroomHit,
HitSound = BroomHit,
HitFloorSound = BroomHit,
SwingSound = BroomSwing,
        TreeDamage =   0,
        TwoHandWeapon = TRUE,
        CriticalChance = 5,
        CritDmgMultiplier = 1,
        MinDamage = 0.2,
        MaxDamage = 0.5,
        BaseSpeed = 1.2,
        AttachmentType = Shovel,
        Tags = ClearAshes,
    }
}}
}}


== See Also ==
== See also ==
* [[Bleach]]
* [[Mop]]
* [[Mop]]
* [[Bleach]]
* [[Sponge]]
* [[Washing Machine]]


{{Navbox_weapons}}
{{Navbox_weapons}}

Revision as of 14:27, 30 December 2023

Template:Infobox weapon A broom is a cleaning tool and improvised blunt weapon.

Usage

Cleaning

If the player is carrying both a bottle of bleach and a broom, when right-clicking a blood splatter, the option "Clean Blood" will appear. Cleaning bloodstains is currently cosmetic and will not affect the player's health. Both the bath towel and dish towel also have the same function, however they also have additional uses and will usually be preferred over the broom.

A mop serves the same purpose.

Weapon

A broom can be used as an improvised weapon. It has particularly low durability and damage, but can hit two zombies simultaneously and has longer than average maximum range.

Condition

The broom has a maximum condition of 3. Its rate of degradation is influenced by the long blunt and maintenance skills. The chance of losing durability can be simplified to the following formula: 1 in (2 + maintenanceMod × 2). Where "maintenanceMod" is calculated using the long blunt and maintenance skills.
Below is an example of the chance of losing durability at varying levels of the maintenance and long blunt skills.

For how this is calculated, see: Condition
Maintenance skill Weapon skill Condition lower chance
0 0 1/2 (50%)
0 4 1/4 (25%)
0 8 1/6 (17%)
4 0 1/6 (17%)
8 0 1/10 (10%)
4 4 1/8 (13%)
4 8 1/10 (10%)
8 8 1/14 (7%)
10 10 1/16 (6%)

Distribution

Brooms can be found in general stores, kitchens, and Gigamarts.

Code

Code icon.png Code snippet! This section contains source code from Project ZomboidShow / Hide

Source: ProjectZomboid\media\scripts\items_weapons.txt

Retrieved: Build 41.78.16
item Broom
    {
        DisplayCategory = Household,
        MaxRange	=	1.6,
        WeaponSprite	=	Broom,
        MinAngle	=	0.85,
        Type	=	Weapon,
        MinimumSwingTime	=	2,
        KnockBackOnNoDeath	=	FALSE,
        SwingAmountBeforeImpact	=	0.02,
        Categories	=	Improvised;Blunt,
        ConditionLowerChanceOneIn	=	2,
        Weight	=	1,
        SplatNumber	=	1,
        PushBackMod	=	0.3,
        SubCategory	=	Swinging,
        ConditionMax	=	3,
        MaxHitCount	=	3,
        DoorDamage	=	1,
        SwingAnim	=	Bat,
        DisplayName	=	Broom,
        MinRange	=	0.61,
        SwingTime	=	2,
        KnockdownMod	=	0,
        SplatBloodOnNoDeath	=	FALSE,
        Icon	=	Pushbroom,
        RunAnim	=	Run_Weapon2,
        IdleAnim	=	Idle_Weapon2,
        BreakSound  =   BroomBreak,
        DoorHitSound = BroomHit,
		HitSound = BroomHit,
		HitFloorSound = BroomHit,
		SwingSound = BroomSwing,
        TreeDamage  =   0,
        TwoHandWeapon = TRUE,
        CriticalChance	=	5,
        CritDmgMultiplier = 1,
        MinDamage	=	0.2,
        MaxDamage	=	0.5,
        BaseSpeed = 1.2,
        AttachmentType = Shovel,
        Tags = ClearAshes,
    }

See also