Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --ProgID: dungeon-71
- --Random attacks from Yllianth, fight trigger
- function getTableKeys(tab)
- local keyset = {}
- for k,v in pairs(tab) do
- keyset[#keyset + 1] = k
- end
- return keyset
- end
- local function dverb(d)
- local verbs = {
- [1]="tickles",
- [3]="bruises",
- [5]="scratches",
- [7]="grazes",
- [9]="nicks",
- [11]="scars",
- [13]="hits",
- [15]="injures",
- [17]="wounds",
- [19]="mauls",
- [21]="maims",
- [23]="mangles",
- [25]="mars",
- [27]="@GLACERATES@w",
- [29]="@BDECIMATES@w",
- [31]="@MDEVASTATES@w",
- [36]="@bERADICATES@w",
- [41]="@WOBLITERATES@w",
- [46]="@gEXTIRPATES@w",
- [51]="@CINCINERATES@w",
- [56]="@CMUTILATES@w",
- [61]="@RDISEMBOWELS@w",
- [66]="@RMASSACRES@w",
- [71]="@BDISMEMBERS@w",
- [76]="@BRENDS@w",
- [81]="@Y- BLASTS -@w",
- [86]="@M-= DEMOLISHES =-@w",
- [91]="@Y** @WSHREDS @Y**@w",
- [96]="@M****@W DESTROYS@M ****@w",
- [101]="@W*****@C PULVERIZES@W *****@w",
- [111]="@B-=- VAPORIZES -=-@w",
- [121]="@M<-==-> @CATOMIZES @M<-==->@w",
- [131]="@C<@W-:-@C> @WASPHYXIATES @C<@W-:-@C>@w",
- [141]="@W<-*->@C RAVAGES @W<-*->@w",
- [151]="@M<>*<> @CFISSURES @M<>*<>@w",
- [161]="@Y<*>@R<*> @BLIQUIDATES @R<*>@Y<*>@w",
- [171]="@c<*>@Y<*>@R<*> @GEVAPORATES @R<*>@Y<*>@c<*>@w",
- [181]="@Y<-@Y=-@Y> @RSUNDERS @Y<-@Y=-@Y>@w",
- [191]="@W<=-=><=-=> @GTEARS INTO @W<=-=><=-=>@w",
- [201]="@Y<->@B*@Y<=> @BWASTES @Y<=>@B*@Y<->@w",
- [221]="@R<-+-><-*-> @WCREMATES @R<-*-><-+->@w",
- [241]="@M<*><*>@R<*><*> ANNIHILATES <*><*>@M<*><*>@w",
- [261]="@L<--*--><--*--> @BIMPLODES @L<--*--><--*-->@w",
- [281]="@C<@W-@C><-=-><-> @WEXTERMINATES @C<-><-=-><@W-@C>@w",
- [301]="@R<-==->@G<-==-> @RSHATTERS@G <-==->@R<-==->@w",
- [331]="@G<@W*><-:-><*@G> @YSLAUGHTERS @G<@W*><-:-><*@G>@w",
- [361]="@C<-*->@M<->@C<-*-> @MRUPTURES @C<-*->@M<->@C<-*->@w",
- [400]="@Y<-*->@R<*>@Y<-*-> @GNUKES @Y<-*->@R<*>@Y<-*->@w",
- [450]="@W-<[=-+-=]@B<@W:::<>:::@B>@W GLACIATES @B<@W:::<>:::@B>@W[=-+-=]>-@w",
- [500]="@w<-=->@R<-:-*-:->@w<*--*> @RMETEORITES@w <*--*>@R<-:-*-:->@w<-=->@w",
- [550]="@R<-:-@R>@Y<-:-*-:->@R<-*-> @WSUPERNOVAS @R<-*->@Y<-:-*-:->@R<-:->@w",
- [600]="@Rdoes UNSPEAKABLE things@w",
- [800]="@Rdoes UNTHINKABLE things@w",
- [1200]="@Rdoes UNIMAGINABLE things@w",
- [2000]="@Rdoes UNBELIEVABLE things@w"}
- local imatch = 1
- local keys = getTableKeys(verbs)
- table.sort(keys)
- for key,value in ipairs(keys) do
- if d >= value then imatch = value end
- end
- return verbs[imatch]
- end
- local function doDmg(ch,dmin,dmax,msg,lethal)
- --Standard Damage
- local hp = ch.hp
- damage(ch,dmin,dmax,LP_PLRONLY)
- local dmg = hp - ch.hp
- if lethal == true and ch.hp == 1 then dmg = dmg + 1 end
- msg = string.gsub(msg,"DVERB",dverb(dmg).."@R")
- msg = "@R"..msg.." @R["..dmg.."]@w"
- echoat(ch,msg)
- --Finish them off, no further messages after this!
- if lethal == true and ch.hp == 1 then damage(ch,50000,50000,LP_PLRONLY+LP_LETHAL) end
- end
- local function dirDmg(ch,dmin,dmax,msg,lethal)
- --Direct Damage
- local dmg = math.random(dmin,dmax)
- if dmg > ch.hp then dmg = ch.hp - 1 end
- ch.hp = ch.hp - dmg
- if lethal == true and ch.hp == 1 then dmg = dmg + 1 end
- msg = string.gsub(msg,"DVERB",dverb(dmg).."@R")
- msg = "@R"..msg.." @R["..dmg.."]@w"
- echoat(ch,msg)
- --Finish them off, no further messages after this!
- if lethal == true and ch.hp == 1 then damage(ch,50000,50000,LP_PLRONLY+LP_LETHAL) end
- end
- echoat(ch,"@cYllianth's eyes narrow and you feel yourself being squeezed!@w")
- doDmg(ch,26000,31000,"Yllianth's crushing force DVERB you!@w",true)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement