Add details to AddHP function

This commit is contained in:
mboelen 2016-04-19 17:48:06 +02:00
parent 166c35bc69
commit 1f0261f168
1 changed files with 9 additions and 3 deletions

View File

@ -81,17 +81,23 @@
#
#################################################################################
# Add Hardening Points
################################################################################
# Name : AddHP()
# Description : Add Hardening Points
# Returns : <nothing>
################################################################################
AddHP() {
HPADD=$1; HPADDMAX=$2
HPPOINTS=`expr ${HPPOINTS} + ${HPADD}`
HPTOTAL=`expr ${HPTOTAL} + ${HPADDMAX}`
if [ ${HPADD} -eq ${HPADDMAX} ]; then
LogText "Hardening: assigned maximum number of hardening points for this item (${HPADDMAX}). Currently having ${HPPOINTS} points (out of ${HPTOTAL})"
else
else
LogText "Hardening: assigned partial number of hardening points (${HPADD} of ${HPADDMAX}). Currently having ${HPPOINTS} points (out of ${HPTOTAL})"
fi
}
}
################################################################################