====== Melee Combat ====== {{ rpd:images:melee_combat_illustration.png|Melee Combat }} **Melee Combat** in Remixed Dungeon involves close-range combat between the hero and dungeon creatures. This is the most basic form of combat in the game. ==== Melee Combat Mechanics ==== * **Attack Skill**: Determines the chance to hit an enemy * **Defense Skill**: Determines the chance to dodge an attack * **Damage**: The amount of damage dealt when an attack connects * **Armor**: Reduces incoming physical damage based on armor level and glyphs * All melee combat happens at adjacent tiles (one tile distance) ==== Attack System ==== In melee combat, the chance to hit is calculated as: * Hit chance = Attack Skill / (Attack Skill + Defense Skill) * Minimum hit chance is 5% (always possible to hit) * Maximum hit chance is 95% (always possible to miss) ==== Damage Calculation ==== * **Weapon Damage**: Base damage range from equipped weapon * **Hero Strength**: Additional damage based on hero's strength * **Weapon Upgrades**: Each upgrade level adds +1 to damage range * Final damage = Random value in weapon's damage range + strength bonus ==== Weapon Types ==== * **Swords**: Balanced weapons with good damage and speed * **Axes**: High damage but slower attacks * **Maces**: Moderate damage with special properties * **Spears**: Reach weapons that can attack from a distance * **Daggers**: Fast attacks with lower damage * **Special Weapons**: Unique weapons with special properties ==== Defensive Actions ==== * **Dodging**: Based on Defense Skill and can avoid all damage from an attack * **Blocking**: Armor reduces incoming damage by a percentage * **Evasion**: Special skills and items can increase dodge chance * **Resistances**: Certain buffs and equipment provide resistance to specific damage types ==== Melee Combat Advantages ==== * **Sustainability**: No consumable resources needed (unlike ranged combat) * **Reliability**: Can be used indefinitely without ammunition concerns * **Consistency**: Doesn't require line of sight like ranged attacks * **Upgrading**: Weapons can be directly upgraded for permanent improvements ==== Melee Combat Disadvantages ==== * **Risk**: Requires being in close proximity to enemies * **Vulnerability**: Attacking puts hero at risk of retaliation * **Surprise**: Enemies can attack first if hero initiates combat * **Positioning**: Difficult to fight multiple enemies simultaneously ==== Combat Positioning ==== * **Door Fighting**: Use doors to separate enemies and fight them individually * **Corridor Warfare**: Use narrow corridors to fight enemies one at a time * **Kiting**: Move after each attack to avoid retaliation * **Surprise Attack**: Backstabbing enemies from behind for bonus damage ==== Weapon Enchantments ==== Melee weapons can be enchanted with special properties: * **Fire**: Chance to deal additional fire damage * **Poison**: Chance to poison the enemy * **Shocking**: Chance to deal electricity damage to adjacent enemies * **Instability**: Random effect on each attack * **Lucky**: Attacks deal maximum damage more often * **Sacrifice**: Deal damage to yourself to damage the enemy more * And many more enchantments with different effects ==== Combat-Related Buffs ==== * **Fury**: Increases damage output temporarily * **Invisibility**: Allows attacks without retaliation * **Paralysis**: Disables enemy actions * **Terror**: Forces enemies to flee * **Bleeding**: Causes ongoing damage * **Burning**: Causes ongoing fire damage ==== Melee Combat Strategy ==== * **Initiative**: Consider whether to attack first or wait for enemies to approach * **Health Management**: Ensure sufficient health before engaging in combat * **Equipment**: Choose weapons and armor appropriate for your enemy * **Positioning**: Use level geometry to your advantage * **Conservation**: Save health and resources for more difficult enemies * **Upgrades**: Prioritize upgrading your weapon for improved performance ==== Special Melee Abilities ==== * **Cleave**: Hit multiple adjacent enemies in one attack * **Backstab**: Bonus damage when attacking from behind * **Combo**: Additional damage after consecutive hits * **Disarm**: Remove enemy's weapon for a turn ==== Technical Details ==== * Core combat logic: [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/watabou/pixeldungeon/actors/Actor.java|Actor.java]] * Attack mechanics: [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/watabou/pixeldungeon/actors/Actor.java#L125-L180|Attack implementation]] * Damage calculations: [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/watabou/pixeldungeon/actors/Actor.java#L150-L175|Damage calculation]] * Weapon enchantments: [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/watabou/pixeldungeon/items/weapon/enchantments/Enchantment.java|Enchantment system]] ==== See Also ==== * [[en:rpd:ranged_combat|Ranged Combat]] - Distance combat mechanics * [[en:rpd:combat|Combat]] - General combat information * [[en:rpd:mechanics|Game Mechanics]] - General game mechanics * [[en:rpd:weapons|Weapons]] - List of weapons and their properties * [[en:rpd:weapon_enchantments|Weapon Enchantments]] - Special weapon effects * [[en:rpd:enemies|Enemies]] - Information about dungeon creatures * [[en:rpd:buffs|Buffs and Debuffs]] - Status effects in combat {{tag> rpd combat mechanics melee }}