D2ModdingToolset icon indicating copy to clipboard operation
D2ModdingToolset copied to clipboard

Extra bonus for a Warrior lord

Open Positiff88 opened this issue 3 years ago • 5 comments
trafficstars

Proposal: It will be nice to have an option to preconstruct a Temple building when a Warrior lord is taken and to add an extra bonus for his armies (in my opinion the most interesting bonus is +25% of an extra experience for all units, but it also can be an extra health, initiative, accuracy, damage or armor).

Justification: Unfortunately, a Warrior lord is the weakest one among the lords at the moment. Unlike Mage and Diplomat lords (who has a Magic Tower and Guild buildings at the start), a Warrior lord has no preconstructed building and gives only 15% regeneration bonus, which is nothing against bonuses of Mage lord (spent 50% less resources for spell research and can cast spells two times per day) and Diplomat lord (building of the cities is 50% cheeper and Thief has much more abilities).

Positiff88 avatar Feb 14 '22 10:02 Positiff88

Added option 'buildTempleForWarriorLord' to settings.lua that allows to start scenarios with pre build temple for warrior lord. Additional bonuses not implemented yet, btw extra health is difficult to add.

VladimirMakeev avatar Feb 24 '22 17:02 VladimirMakeev

Nice news! I hope that it is not so difficult to add the other mentioned bonuses, especially experience and armor, which in a certain way help to counteract the ability to cast attacking spells twice (armor reduces damage, and upgraded units have more health).

Positiff88 avatar Feb 24 '22 18:02 Positiff88

I'm thinking about changing the whole battle system so it will be scripted and configurable as much as possible. It's a huge amount of work with a huge potential. Can't tell how long would it take to do, there are some parts of battle and AI logic that needs to be reverse-engineered prior to starting. With that in mind I think exp, armor and accuracy computation will be a part of this system.

VladimirMakeev avatar Feb 24 '22 19:02 VladimirMakeev

@Positiff88 В то время пока мы еще не добавили возможности давать бонусы лордам, появилась возможность давать бонусы юнитам в зависимости от того какому лорду они служат.

Сделано по средствам врожденных модификаторов - т.е. модификаторов которые можно привязать к юниту с момента его "рождения", а-ля банка с перманентным эффектом выданная в роддоме. См. раздел "Supports native unit modifiers" в https://github.com/VladimirMakeev/D2ModdingToolset#readme. Можно использовать как стандартные так и кастомные модификаторы (см. Supports custom unit modifiers).

В данном случае целесообразным видится добавление глобального кастомного модификатора всем юнитам, в его коде делать проверку на хозяина-лорда. Как сделать такую проверку - см. доки по скриптовому API https://github.com/VladimirMakeev/D2ModdingToolset/blob/master/luaApi.md Учти, что добавление глобального модификатора скажется на быстродействии.

UnveN avatar Jun 30 '22 07:06 UnveN

Спасибо огромное! Буду пробовать.

Positiff88 avatar Jun 30 '22 10:06 Positiff88

I've implemented +15% extra experience bonus using native unit modifiers and custom attack reaches.

Positiff88 avatar Jun 22 '23 06:06 Positiff88