Skip to content

Commit 2e590c2

Browse files
committed
New Update! Version 26
1 parent 9c6d73f commit 2e590c2

31 files changed

+432
-62
lines changed

arts/a.jpeg

-586 KB
Binary file not shown.

hero/initHeroes.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"items": [
66
{
77
"kind":"Gold",
8-
"quantity": 20000
8+
"quantity": 200
99

1010
}
1111
],

items/forgedLongsword.png

115 Bytes
Loading

items/forgedSword.png

47 Bytes
Loading

scripts/buffs/ChopBuff.lua

+8-5
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,16 @@ return buff.init{
3232
Spell.expMax = Spell.expMax+6
3333
Spell.lvl = Spell.lvl+1
3434
end
35-
36-
local buffs = RPD.affectBuff(enemy,RPG.Buffs.Bleeding,2)
37-
buffs:level(math.ceil(RPG.physStr()*0.2))
38-
RPD.topEffect(enemy:getPos(),"bleeding_effect")
35+
36+
if RPG.noBloodMobs[enemy:name()] ~= "false" then
37+
local buffs = RPD.affectBuff(enemy,"FastBleeding",2)
38+
buffs:level( RPG.smartInt( RPG.physStr()*0.1) )
39+
RPD.topEffect(enemy:getPos(),"bleeding_effect")
40+
end
41+
3942
buff:detach()
4043
if RPG.physicStr ~= nil then
41-
return RPG.damage(enemy,damage+math.ceil(RPG.physStr()*0.2),type,elmnt)
44+
return RPG.damage(enemy,damage+RPG.smartInt(RPG.physStr()*0.2),type,elmnt)
4245
else
4346
return damage
4447
end

scripts/buffs/FastBleeding.lua

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
--- Created by Mongol
3+
--- VK: mongolinsult
4+
---
5+
6+
local RPD = require "scripts/lib/commonClasses"
7+
local RPG = require "scripts/lib/Functions"
8+
local storage = require "scripts/lib/storage"
9+
local buff = require "scripts/lib/buff"
10+
11+
local hero = RPD.Dungeon.hero
12+
local type ="true"
13+
14+
return buff.init{
15+
desc = function ()
16+
return {
17+
icon = 26,
18+
name = "Bleeding_Name",
19+
info = ""
20+
}
21+
end,
22+
23+
charAct = function(self,buff)
24+
RPD.topEffect(buff.target:getPos(),"bleeding_effect")
25+
RPG.damage(buff.target,buff:level(),type,elmnt)
26+
end
27+
}

scripts/buffs/Headache.lua

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
--- Created by Mongol
3+
--- VK: mongolinsult
4+
---
5+
6+
local RPD = require "scripts/lib/commonClasses"
7+
local RPG = require "scripts/lib/Functions"
8+
local buff = require "scripts/lib/buff"
9+
10+
return buff.init{
11+
desc = function()
12+
return {
13+
icon = 43,
14+
name = "Headache_BuffN",
15+
info = "Headache_BuffD",
16+
}
17+
end,
18+
19+
charAct = function(self,buff)
20+
local diceRoll = math.random(1,100)
21+
local chance = buff:level()
22+
if buff.target:isBoss() then
23+
chance = chance /2
24+
end
25+
if diceRoll <= chance then
26+
buff.target:spend(1)
27+
RPG.flyText(buff.target,RPD.textById("headache"),"red")
28+
end
29+
end
30+
}

scripts/buffs/PowerBuff.lua

+2-4
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ local dmgModifs = {
118118
return buff.init{
119119
desc = function ()
120120
return {
121-
icon = 1,
121+
icon = -1,
122122
info = "",
123123
}
124124
end,
@@ -150,8 +150,6 @@ attackProc = function(self,buff,enemy,damage)
150150
end
151151
end
152152

153-
local color = {phys = 0xffff00, mag = 0x33ccff}
154-
155153

156154
RPG.dmgText(type[1],mainElement,enemy)
157155
return totalDmg
@@ -166,7 +164,7 @@ detach = function(self,buff)
166164
local pos = buff.target:getPos()
167165
local mobModifs = dmgModifs[buff.target:getMobClassName()]
168166
local level = RPD.Dungeon.level
169-
local loot = mobModifs["loot"]
167+
local loot = mobModifs["loot"] or ""
170168
local chance = mobModifs["chance"]
171169
local countOfLoot
172170
if loot ~= nil then

scripts/buffs/RPGbuff.lua

+3
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ return buff.init{
5757

5858
Spells.Combat = Que.getMas("spelllist")
5959

60+
if hero:isStarving() then
61+
RPD.removeBuff(hero,"Hunger")
62+
end
6063

6164
if hero:buffLevel("Poison") > 0 then
6265
RPD.affectBuff(hero,"PoisonBuff",hero:buffLevel("Poison")):level(RPG.smartInt(0.5+depth*0.5))

scripts/buffs/SaiBuff.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ return buff.init{
2121
}
2222
end,
2323
drBonus = function(self,buff)
24-
return math.ceil(1+buff:level())
24+
return math.ceil(1+buff:level()*2)
2525
end
2626
}

scripts/items/Ry.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ local twohandWeapon = require "scripts/lib/twohandWeapon"
1414
local storage = require "scripts/lib/storage"
1515

1616
local item = require "scripts/lib/item"
17-
local statsMax = 12
18-
local quanStats = 5
17+
local statsMax = 20
18+
local quanStats = 10
1919
local stra = 200
2020
local tier = 10
2121
local maxDmg = 40

scripts/items/forgedHatchet.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ local Add = require "scripts/lib/AdditionalFunctions"
1111

1212
local storage = require "scripts/lib/storage"
1313

14-
local forgedHalberd = require "scripts/lib/forgedHatchet"
14+
local forgedHatchet = require "scripts/lib/forgedHatchet"
1515

1616
local item = require "scripts/lib/item"
1717

scripts/items/missiles/ParalysisArrow.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ return item.init {
2020
return {2,4}
2121
end,
2222
buff = function()
23-
return {"Paralysis",1 +RPG.smartInt(RPG.AllLuck()*0.02),1}
23+
return {"Paralysis",1 +RPG.smartInt(RPG.AllLuck()*0.05),1}
2424
end,
2525
isFliesStraight = function()
2626
return true

scripts/lib/Functions.lua

+62-4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,40 @@ local RPG
1010
mainMatCount = 16,
1111
materialsCount = 0,
1212

13+
noBloodMobs =
14+
{
15+
BoneGolem_lvl1="false",
16+
BoneGolem_lvl2="false",
17+
BoneGolem_lvl3="false",
18+
Skeleton = "false",
19+
DM300 = "false",
20+
Goo = "false",
21+
EarthElemental = "false",
22+
WaterElemental = false,
23+
FireElemental = "false",
24+
AirElemental = "false",
25+
Golem = "false",
26+
SpiritOfPain = "false",
27+
Statue = "false",
28+
Wraith = "false",
29+
IceElemental = "false",
30+
Crystal = "false",
31+
ArmoredStatue = "false",
32+
GoldenStatue = "false",
33+
Shadow = "false",
34+
Undead = "false",
35+
ShadowLord = "false",
36+
TreacherousSpirit = "false",
37+
IceGuardianCore = "false",
38+
IceGuardian = "false",
39+
EnslavedSoul = "false",
40+
ExplodingSkull = "false",
41+
JarOfSouls = "false",
42+
Lich = "false",
43+
RunicSkull = "false"
44+
45+
},
46+
1347
Objects ={
1448
Ui={
1549
WndInfoItem = luajava.bindClass("com.watabou.pixeldungeon.windows.WndInfoItem"),
@@ -410,23 +444,27 @@ local RPG
410444
local smithData = storage.gameGet("smithing") or {}
411445
local smithScale = 0.7 + 0.15*smithy.lvl
412446
local rareName = ""
447+
local rareScale = 0
413448
local exp = 0
414449

415450
local rareRandom = math.random(1,15000)
416451
if rareRandom <= 100 +RPG.AllLuck()*2 then
417452
smithScale = smithScale +0.666*smithy.lvl
418453
rareName = "("..RPD.textById("Legendary")..")"
419454
exp = exp + 12
455+
rareScale = 10
420456

421457
elseif rareRandom <= 800 +RPG.AllLuck()*2 then
422458
smithScale = smithScale +0.3*smithy.lvl
423459
rareName = "("..RPD.textById("Epic")..")"
424460
exp = exp +5
461+
rareScale = 6
425462

426463
elseif rareRandom <= 3500 +RPG.AllLuck()*2 then
427464
smithScale = smithScale +0.1*smithy.lvl
428465
rareName = "("..RPD.textById("Rare")..")"
429466
exp = exp+2
467+
rareScale = 2
430468

431469
end
432470

@@ -834,14 +872,14 @@ local RPG
834872
end
835873
smithData = storage.gameGet("smithing") or {}
836874
if smithData.exp >= smithData.expToUp then
837-
storage.gamePut("smithing", {lvl = smithData.lvl+1, expToUp = smithData.expToUp +2*((smithData.lvl+1)%2)+smithData.lvl+1, exp = 0 +smithData.exp -smithData.expToUp})
875+
storage.gamePut("smithing", {lvl = smithData.lvl+1, expToUp = smithData.expToUp +3*((smithData.lvl+1)%2)+smithData.lvl+2, exp = 0 +smithData.exp -smithData.expToUp})
838876
end
839877

840878
if smithy.mode == "weapon" or smithy.mode == "magic" then
841879

842-
return {str = RPG.smartInt(str),info = itemInfo, icon = icon, name = name, visualName = visualName, tier = tier, minDmg = RPG.smartInt(minDmg), maxDmg = RPG.smartInt(maxDmg), delay = delayFactor, accuracy = accuracy, range = range, dstats = stats, addStats = addStatsGroups[mode], type = table.unpack(objectDmgType[smithy.choosenObject],1), element = table.unpack(objectDmgType[smithy.choosenObject],2)}
880+
return {str = RPG.smartInt(str),info = itemInfo, icon = icon, name = name, visualName = visualName, tier = tier, minDmg = RPG.smartInt(minDmg), maxDmg = RPG.smartInt(maxDmg), delay = delayFactor, accuracy = accuracy, range = range, dstats = stats, addStats = addStatsGroups[mode], type = table.unpack(objectDmgType[smithy.choosenObject],1), element = table.unpack(objectDmgType[smithy.choosenObject],2), rareScale = rareScale}
843881
else
844-
return {str = RPG.smartInt(str),name = name, visualName = visualName, info = itemInfo, icon = icon, tier = tier, dr = drOrDmg[mode], dstats = RPG.unpackAll({stats,allAdd})}
882+
return {str = RPG.smartInt(str),name = name, visualName = visualName, info = itemInfo, icon = icon, tier = tier, dr = drOrDmg[mode], dstats = RPG.unpackAll({stats,allAdd}), rareScale = rareScale}
845883
end
846884
end,
847885

@@ -984,6 +1022,26 @@ local RPG
9841022
end,
9851023

9861024

1025+
flyText = function(enemy,text,color)
1026+
1027+
if color == "red" then
1028+
enemy:getSprite():showStatus(0xf00000,text)
1029+
end
1030+
1031+
if color == "green" then
1032+
enemy:getSprite():showStatus(0x45db00,text)
1033+
end
1034+
1035+
if color == "white" then
1036+
enemy:getSprite():showStatus(0xffffff,text)
1037+
end
1038+
1039+
if color == "orange" then
1040+
enemy:getSprite():showStatus(0xf08000,text)
1041+
end
1042+
end,
1043+
1044+
9871045
dmgText = function(type,elmnt,enemy)
9881046

9891047
color = 0xffffff
@@ -1195,7 +1253,7 @@ local RPG
11951253
local armor = hero:getBelongings().armor
11961254
local a =armor:requiredSTR()-1
11971255

1198-
return math.max(0.1, ((0.8 +RPG.AllFast()*0.04) -0.03*RPD.Dungeon.depth -0.025*(math.min(0,armor:requiredSTR()-RPG.physStr())) ))*math.pow(1.3,a)
1256+
return math.max(0.1, ((0.8 +RPG.AllFast()*0.04) -0.05*RPD.Dungeon.depth -0.025*(math.min(0,armor:requiredSTR()-RPG.physStr())) ))*math.pow(1.3,a)
11991257
end,
12001258

12011259
plus = function(int)

scripts/lib/forgedAxe.lua

+38-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@ local forgedWeapon = {}
99
local str
1010
local minDmg
1111
local maxDmg
12-
local dmg
12+
local dmgFrSt1
13+
local dmgFrSt2
14+
local dmg = 0
15+
local hits = 0
16+
local prevEnemy = ""
17+
1318

1419

1520
forgedWeapon.makeWeapon = function()
@@ -53,7 +58,7 @@ forgedWeapon.makeWeapon = function()
5358

5459

5560
getVisualName = function()
56-
return ""
61+
return "Gasock"
5762
end,
5863

5964

@@ -118,8 +123,8 @@ forgedWeapon.makeWeapon = function()
118123
stab = 12,
119124
crush = 13
120125
}
121-
local dmgFrSt1 = d.addstats[id[d.element[1] or d.element]]
122-
local dmgFrSt2 = d.addstats[id[d.element[2]]] or {0,dmgFrSt1[2]}
126+
dmgFrSt1 = d.addstats[id[d.element[1] or d.element]]
127+
dmgFrSt2 = d.addstats[id[d.element[2]]] or {0,dmgFrSt1[2]}
123128
dmg = RPG.getDamage(user:getEnemy(),dmgRoll *((dmgFrSt1[2]+dmgFrSt2[2])/200 +1) + dmgFrSt1[1] +dmgFrSt2[1],self.data.type,self.data.element)
124129

125130
RPG.dmgText("phys",self.data.element,user:getEnemy())
@@ -129,6 +134,35 @@ forgedWeapon.makeWeapon = function()
129134

130135
postAttack = function(self,item,enemy)
131136
RPG.weaponOtherDmg(enemy,dmg,self.data.addstats)
137+
local user = RPD.Dungeon.hero
138+
local chanceRoll = math.random(1,12)
139+
if chanceRoll <= 3 +hits +self.data.rareScale and dmg > 0 then
140+
hits = 0
141+
RPD.topEffect(user:getPos(),"dissection_effect")
142+
143+
local level = RPD.Dungeon.level
144+
local x = level:cellX(user:getPos())
145+
local y = level:cellY(user:getPos())
146+
local weaponA = user:getBelongings().weapon
147+
local weaponB = user:getBelongings().leftHand
148+
149+
for i = x-1,x+1 do
150+
for j = y-1,y+1 do
151+
local pos = level:cell(i,j)
152+
local enemyOnWay = RPD.Actor:findChar(pos)
153+
if enemyOnWay and enemyOnWay ~= RPD.Dungeon.hero and enemyOnWay ~= enemy then
154+
RPG.damage(enemyOnWay,RPG.smartInt(1+weaponA:damageRoll(hero)*(0.8 + 0.1*self.data.rareScale) + weaponB:damageRoll(hero)*0.65 + RPG.physStr()*0.1), "phys",self.data.element)
155+
end
156+
end
157+
end
158+
159+
elseif prevEnemy == enemy or hits == 0 then
160+
hits = hits +1
161+
else
162+
hits = 1
163+
end
164+
165+
prevEnemy = enemy
132166
end,
133167

134168

scripts/lib/forgedBow.lua

+19-1
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@ local str
1111
local checkForBuff
1212
local minDmg
1313
local maxDmg
14-
local dmg
14+
local dmg = 0
1515
local dmgFromArrow = 0
1616
local addMin = 0
1717
local addMax =0
18+
local hits = 0
19+
local prevEnemy = ""
1820

1921

2022
forgedWeapon.makeWeapon = function()
@@ -187,6 +189,22 @@ forgedWeapon.makeWeapon = function()
187189
end
188190

189191
RPG.weaponOtherDmg(enemy,dmg,self.data.addstats)
192+
local f =2 +hits +self.data.rareScale
193+
local chanceRoll = math.random(1,12)
194+
if chanceRoll <= f and dmg > 0 and RPG.noBloodMobs[enemy:getMobClassName()] ~= "false" then
195+
hits = 0
196+
local bleed = RPD.affectBuff(enemy,"FastBleeding",3)
197+
bleed:level( math.max(1, RPG.smartInt(2+dmg*(0.4 +0.1*self.data.rareScale)/3)) )
198+
RPG.flyText(enemy,RPD.textById("bleeding"),"red")
199+
RPD.topEffect(enemy:getPos(),"bleeding_effect")
200+
201+
elseif prevEnemy == enemy or hits == 0 then
202+
hits = hits +1
203+
else
204+
hits = 1
205+
end
206+
207+
prevEnemy = enemy
190208
end,
191209

192210

0 commit comments

Comments
 (0)