- Joined
- Apr 8, 2011
- Messages
- 92
This system expand standart combat mechanic. Added many new parameters which interact with each other.
Requirements:
Now you need to wear items. Each item have their own rank, armor and weapon can be socketed with stones, one stone can give different bonuses depending on where he inserted (Diablo like). Item can have up to four additional bonus parameters.
Weapon values
Armor have defence as main, and jewelry - suppression.
Representing an inventory with 5 categories for different item types, 2 slots for weapon, 5 for armor, 3 for jewelry, 25 slots in each category.
Functionality
Strikes from side nd back cannot be blocked, parried or evaded. You can block or parry critical strike. Existing possibility to reflect debuffs or damage back to attacker. Healing depends on healing rate, you can modify it.
New negative effects:
All negative effects laying with chance, but you can config debuff so he will be always 100% chance. If you attacking with effect on background, and strike was evaded or resisted, then effect will not be laid down on target.
Additional skill activators:
Equipping a weapon in main hand, flag means quip or uneqip
Same for offhand
Same for others custom items
Creating item by id, on coords, returns item. For creating custom items you need to use this.
Removing custom item.
BroadcastDamage(int status, real damage, unit for)
Broadcasting damage and attack status with texttag. Usually unsing in main functions.
Returning damage bonus depending on positioning
Takes damage type, attacker, attacked, and accuracy bonus, returning attack status
Same for critical chance
simple, returning attack status
Same for physical damage
Also simple, unit A healing unit B with amount
Applying effect from unit source on unit victim, if victim dont exists we put here null and write effect coords in x and y, effect we needed and its level
simple, but max level is 5
also simple
PushMissile(unit from, int skill_id, real start_x, real start_y, real end_z)
launching missile to coords.
for inventory
Config
Formulas
Physical damage calculates as
Magical
Hit chances
Debuff
Main
http://www.hiveworkshop.com/forums/pastebin.php?id=a8vo9y
MISC
http://www.hiveworkshop.com/forums/pastebin.php?id=bxula8
Utils
http://www.hiveworkshop.com/forums/pastebin.php?id=yb70r7
Main Engine
http://www.hiveworkshop.com/forums/pastebin.php?id=gf8lth
Attacks Engine
http://www.hiveworkshop.com/forums/pastebin.php?id=s3fuxy
Buffs Engine
http://www.hiveworkshop.com/forums/pastebin.php?id=v7m4rq
Movement
http://www.hiveworkshop.com/forums/pastebin.php?id=1fk2os
GUI
http://www.hiveworkshop.com/forums/pastebin.php?id=l9phtu
Buttons
http://www.hiveworkshop.com/forums/pastebin.php?id=nqrs4x
Sliders
http://www.hiveworkshop.com/forums/pastebin.php?id=j1bubc
Inventory
http://www.hiveworkshop.com/forums/pastebin.php?id=42vzlk
Book
http://www.hiveworkshop.com/forums/pastebin.php?id=4gdma8
Test commands - inv and book in chat
please comment and discuss, sorry for bad english
changlelog
Requirements:
cJass
vJass
JNGP
1.26a
New parameters
- Physical Attack
- Physical Defence
- Evade
- Parry
- Block
- Physical Critical Strike
- Accuracy
- Attack Speed
- Magical Attack
- Magical Suppression
- Magical Reflect
- Magical Critical Strike
- Magical Accuracy
- Casting Speed
- Weapon Mastery
- Weapon Resist
- Physical Effect Reflect
- Magical Effect Reflect
- Elemental Attack
- Elemental Resist
- Strength
- Steadiness
- Reaction
- Agility
- Intelligence
- Will
Now you need to wear items. Each item have their own rank, armor and weapon can be socketed with stones, one stone can give different bonuses depending on where he inserted (Diablo like). Item can have up to four additional bonus parameters.
Weapon values
- Attack (phys/mag)
- Critical Chance (phys/mag)
- Critical Multiplier (phys/mag)
- Attack Speed
- Radius
- Accuracy (phys/mag)
- Dispersion
Armor have defence as main, and jewelry - suppression.
Fullscreen Inventory
Representing an inventory with 5 categories for different item types, 2 slots for weapon, 5 for armor, 3 for jewelry, 25 slots in each category.
Functionality
- Possibility to share potions on hero, middle button in inventory right-bottom.
- Socketing items, double click on stone and then on item, esc canceling aim. (color of slot selection changing)
- Weight of inventory depends on strenght of hero. Reaching the limit cause speed suffering.
- Book reading (TODO)
Combat Mechanic
Strikes from side nd back cannot be blocked, parried or evaded. You can block or parry critical strike. Existing possibility to reflect debuffs or damage back to attacker. Healing depends on healing rate, you can modify it.
New negative effects:
- Stun
- Paralyze
- Fear
- Physical, Magical, Universal silence
- Blind
All negative effects laying with chance, but you can config debuff so he will be always 100% chance. If you attacking with effect on background, and strike was evaded or resisted, then effect will not be laid down on target.
Additional skill activators:
- Weapon requirement
- Effect
- Position on back from target
- Hp amount
- Without silence
API
JASS:
EquipWeaponItem(unit u, item i, bool flag)
JASS:
EquipOffhandWeaponItem(unit u, item i, bool flag)
JASS:
EquipShieldItem(unit u, item i, bool flag)
EquipArmorItem(unit u, item i, bool flag)
EquipJewelryItem(unit u, item i, bool flag)
JASS:
CreateShieldItem(int item_id, real x, real y)
CreateJewelryItem(int item_id, real x, real y)
CreateArmorItem(int item_id, real x, real y)
CreateWeaponItem(int item_id, real x, real y)
JASS:
RemoveCustomItem(item i)
BroadcastDamage(int status, real damage, unit for)
Broadcasting damage and attack status with texttag. Usually unsing in main functions.
JASS:
GetPositionDamageBonus(unit A, unit B)
JASS:
GetAttackStatus(bool damage_type, unit A, unit B, real bonus)
JASS:
GetCriticalChance(unit A, bool damage_type, real bonus)
JASS:
MagicalDamage(unit A, unit B, real amount, bool can_crit, bool unavoidable, int eff)
JASS:
PhysicalDamage(unit A, unit B, real amount, bool use_attack, bool can_crit, bool unavoidable, bool is_sound, int eff)
JASS:
HealUnit(unit A, unit B, real amount)
JASS:
ApplyEffect(unit source, unit victim, real x, real y, int eff, int level
JASS:
AddBuffToUnit(unit target, unit caster, int buff_id, int level)
JASS:
RemoveBuff(int id, unit A)
PushMissile(unit from, int skill_id, real start_x, real start_y, real end_z)
launching missile to coords.
JASS:
OpenInventory()
CloseInventory()
Config
JASS:
MAX_EVADE = 70.
MIN_EVADE = 5.
MAX_PARRY = 70.
MIN_PARRY = 5.
MAX_BLOCK = 70.
MIN_BLOCK = 5.
MAX_RESIST = 65.
MIN_RESIST = 5.
MAX_CRITICAL = 52.
MIN_CRITICAL = 0.
MAX_MAG_CRITICAL = 40.
MIN_MAG_CRITICAL = 0.
// защита
VALUE_BY_PERCENT_1 = 11
FIRST_DEF_LIMIT = 350
VALUE_BY_PERCENT_2 = 15
SECOND_DEF_LIMIT = 650
VALUE_BY_PERCENT_3 = 19
// маг атака
MA_VALUE_BY_PERCENT_1 = 16
MA_FIRST_LIMIT = 475
MA_VALUE_BY_PERCENT_2 = 19
MA_SECOND_LIMIT = 725
MA_VALUE_BY_PERCENT_3 = 22
Formulas
Physical damage calculates as
((((attack * weapon mastery * weapon resist) + additional) * critical rate * position bonus * attribute bonus * blocked) * physical damage redution rate)
Magical
amount * attribute bonus * magic boost * critical_rate
Hit chances
(1. - (parameter / accuracy) + RND(-0.06, 0.06)) * 100.
Debuff
(base chance / (PARAMETER * 0.09)) / resist rate
Triggers and code
Main
http://www.hiveworkshop.com/forums/pastebin.php?id=a8vo9y
MISC
http://www.hiveworkshop.com/forums/pastebin.php?id=bxula8
Utils
http://www.hiveworkshop.com/forums/pastebin.php?id=yb70r7
Main Engine
http://www.hiveworkshop.com/forums/pastebin.php?id=gf8lth
Attacks Engine
http://www.hiveworkshop.com/forums/pastebin.php?id=s3fuxy
Buffs Engine
http://www.hiveworkshop.com/forums/pastebin.php?id=v7m4rq
Movement
http://www.hiveworkshop.com/forums/pastebin.php?id=1fk2os
GUI
http://www.hiveworkshop.com/forums/pastebin.php?id=l9phtu
Buttons
http://www.hiveworkshop.com/forums/pastebin.php?id=nqrs4x
Sliders
http://www.hiveworkshop.com/forums/pastebin.php?id=j1bubc
Inventory
http://www.hiveworkshop.com/forums/pastebin.php?id=42vzlk
Book
http://www.hiveworkshop.com/forums/pastebin.php?id=4gdma8
Test commands - inv and book in chat
please comment and discuss, sorry for bad english
changlelog
- 1.1 beta - negative effects with alternate state require rank
Attachments
Last edited: