- All images, if having direction, are toward right by default. If you want to add your image, please ensure that it's toward right.
(i
indicates Type = UserType + i
)
- [1, 99]:
Area
and its derived class - [101, 199]:
Monster
's derived class - [201, 299]:
Character
's derived class - [1001, ]: Particles(kinds of visual effects)
If you want to add your custom buff, please follow steps below
- First, add it to enum class
Buff
. - If it is a buff that can be set on a character by hand (i.e., your would see an option button at upper right corner):
- Add it to the list in
BuffUtil::characterBuffs()
; - Give it an icon in BuffUtil::buffToIcon() (remember to add icon path to
img_rsc.qrc
and path string to BuffUtil)
- Add it to the list in
- If it is a de-buff, add it to
BuffUtil::isDeBuff()
. - Add its effect where you want.
- e.g. If effect is decrease damage, add your code to
Entity::getDamage()
, or anywhere else you like.
- e.g. If effect is decrease damage, add your code to
- If it works through attack action, I recommend you to make it by ActionAttack system:
- e.g.
Buff::CAUSE_CORROSION
addBuff::CORROSION
to target; it addsBuff::CORROSION
to ActionAttack inEntity::attack()
first, and target will get it inEntity::attacked()
.
- e.g.
- If it can lead to buff aura, you must give a string with color to display (refer to BuffUtil::buffToString and BuffUtil::buffToColor).
- A character or monster can have 2 buffs at most (de-buff not included) (you can modify it in
Entity::addBuff()
) - Once added through UI, character buff can last for 100 seconds (you can modify it in
GameField.cpp
)