defence.qsrc 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. # defence
  2. if defence <= 0:
  3. defence = 0
  4. defenceM = 0
  5. defenceW = 0
  6. defenceActPar = 0
  7. defenceActParM = 0
  8. defenceAct = 0
  9. defenceActM = 0
  10. defAtk = 0
  11. defAtkM = 0
  12. end
  13. if defenceV <= 0:
  14. defenceV = 0
  15. defenceMV = 0
  16. defenceWV = 0
  17. defenceActParV = 0
  18. defenceActParMV = 0
  19. defenceActV = 0
  20. defenceActMV = 0
  21. defAtkV = 0
  22. defAtkMV = 0
  23. end
  24. if defenceAct > 0:
  25. defence += defenceActPar
  26. defenceAct -= 1
  27. defActParK = defenceActPar/100
  28. pcs_manna -= defActParK
  29. '<b><font color="green">Regeneration consumes <<defActParK>> units of mana.</font></b>'
  30. end
  31. if defenceActM > 0:
  32. defenceM += defenceActParM
  33. defenceActM -= 1
  34. defActParKM = defenceActParM/100
  35. pcs_manna -= defActParKM
  36. '<b><font color="green">Regeneration consumes <<defActParKM>> units of mana.</font></b>'
  37. end
  38. if defenceActV > 0:
  39. defenceV += defenceActParV
  40. defenceActV -= 1
  41. mannaV -= (defenceActParV / 100)
  42. end
  43. if defenceActMV > 0:
  44. defenceMV += defenceActParMV
  45. defenceActMV -= 1
  46. mannaV -= (defenceActParMV / 100)
  47. end
  48. if defAtk > 0:
  49. defAtk -= 1
  50. '<b><font color="green">You protection shield counter-attack the enemy.</font></b>'
  51. gs 'atakB', 'atak'
  52. end
  53. if defAtkV > 0:
  54. defAtkV -= 1
  55. '<b><font color="red">The enemy''s protection shield counter-attacks you.</font></b>'
  56. gs 'atakB1', 'atak'
  57. end
  58. if defAtkM > 0:
  59. defAtkM -= 1
  60. if defenceMV <= 0 and unmaterialV = 0:
  61. defDamM = rand(defenceActParM/2, defenceActParM)
  62. mannaV -= defDamM
  63. defence += defDamM
  64. '<b><font color="green">Your protection shield absorbed <<defDamM>> mana from an enemy, this mana converts into strengthening your defenses.</font></b>'
  65. end
  66. if defenceMV > 0:
  67. defenceMV += defenceActParM
  68. '<b><font color="green">Your protection shield caused <<defenceActParM>> points of damage to your enemy''s mana.</font></b>'
  69. end
  70. if unmaterialV > 0:'<b><font color="green">Your protection shield is trying to absorb the enemy''s attack but it does not work, the enemy is too strong.</font></b>'
  71. end
  72. if defAtkMV > 0:
  73. defAtkMV -= 1
  74. if defenceM <= 0 and unmaterial = 0:
  75. defDamMV = rand(defenceActParMV/2, defenceActParMV)
  76. pcs_manna -= defDamMV
  77. defenceV += defDamMV
  78. '<b><font color="red">You enemy takes <<defDamMV>> mana from you strengthening their defense.</font></b>'
  79. end
  80. if defenceM > 0:
  81. defenceM += defenceActParMV
  82. '<b><font color="red">The protection shield inflicts <<defenceActParMV>> points of damage.</font></b>'
  83. end
  84. if unmaterial > 0:'<b><font color="red">The enemy''s protection shield is trying to absorb your mana but it does not work.</font></b>'
  85. end
  86. --- defence ---------------------------------