Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SetInfo(upgrade, mob/player/P)
- var/obj/O = src.info
- if(!O)O = new()
- else O.overlays = new/list()
- var/text
- var/image/I = new()
- I.maptext_width = 180
- I.maptext_height = 276
- if(src.rank && length(src.rp_cost)>src.rank) text = "<center><font align='top' size = 3><b>Name: </b><font size=2>[src.name] V[src.rank] + 1<br><br>"
- else if(src.rank > 1)text = "<center><font align='top' size = 3><b>Name: </b><font size=2>[src.name] V[src.rank]<br><br>"
- else text = "<center><font align='top' size = 3><b>Name: </b><font size=2>[src.name]<br><br>"
- text += "<font size=3><b>Description:</b><font size=2><br>[src.desc]"
- I.maptext = text
- I.layer = FRAME_LAYER + 0.1
- I.pixel_x = 2
- I.pixel_y = -2
- O.overlays += I
- I.pixel_x=0
- I.pixel_y=0
- I.maptext = "<font color='white'>[text]"
- O.overlays += I
- text = "<center><font size=3 align='top'><b>Stat:</b><font size=2><br>"
- var/spell/S = new src.attached_spell()
- var/spell/S2
- var/calc
- if(upgrade)
- var/t = text2path("[initial(src.attached_spell)]/V[src.rank+1]")
- if(t) S2 = new t()
- for(var/loop=1, loop<=7, loop++)
- switch(loop)
- if(1)
- if(S.spell_dmg)
- if(S2) calc = S2.spell_dmg - S.spell_dmg
- if(S2 && calc > 0)
- text += "<b>Spell Damage: </b>[S.spell_dmg] + [calc]<br>"
- else if(S2 && calc < 0)
- text += "<b>Spell Damage: </b>[S.spell_dmg] - [-calc]<br>"
- else
- text += "<b>Spell Damage: </b>[S.spell_dmg]<br>"
- else if(S2 && S2.spell_dmg)
- text += "<b>Spell Damage: </b>0 + [S2.spell_dmg]<br>"
- if(2)
- if(S.melee_dmg)
- if(S2) calc = S2.melee_dmg - S.melee_dmg
- if(S2 && calc > 0)
- text += "<b>Melee Damage: </b>[S.melee_dmg] + [calc]<br>"
- else if(S2 && calc < 0)
- text += "<b>Melee Damage: </b>[S.melee_dmg] - [-calc]<br>"
- else
- text += "<b>Melee Damage: </b>[S.melee_dmg]<br>"
- else if(S2 && S2.melee_dmg)
- text += "<b>Melee Damage: </b>0 + [S2.melee_dmg]<br>"
- if(3)
- if(S.cast_mana)
- if(S2) calc = S2.cast_mana - S.cast_mana
- if(S2 && calc > 0)
- text += "<b>Mana Cost: </b>[S.cast_mana] + [calc]<br>"
- else if(S2 && calc < 0)
- text += "<b>Mana Cost: </b>[S.cast_mana] - [-calc]<br>"
- else
- text += "<b>Mana Cost: </b>[S.cast_mana]<br>"
- else if(S2 && S2.cast_mana)
- text += "<b>Mana Cost: </b>0 + [S2.cast_mana]<br>"
- if(4)
- if(S.cooldown)
- if(S2) calc = S2.cooldown - S.cooldown
- if(S2 && calc > 0)
- text += "<b>Cooldown: </b>[S.cooldown] + [calc]<br>"
- else if(S2 && calc < 0)
- text += "<b>Cooldown: </b>[S.cooldown] - [-calc]<br>"
- else
- text += "<b>Cooldown: </b>[S.cooldown]<br>"
- else if(S2 && S2.cooldown)
- text += "<b>Cooldown: </b>0 + [S2.cooldown]<br>"
- if(5)
- if(S.tile_dmg)
- if(S2) calc = S2.tile_dmg - S.tile_dmg
- if(S2 && calc > 0)
- text += "<b>Tile Damage: </b>[S.tile_dmg] + [calc]<br>"
- else if(S2 && calc < 0)
- text += "<b>Tile Damage: </b>[S.tile_dmg] - [-calc]<br>"
- else
- text += "<b>Tile Damage: </b>[S.tile_dmg]<br>"
- else if(S2 && S2.tile_dmg)
- text += "<b>Tile Damage: </b>0 + [S2.tile_dmg]<br>"
- if(6)
- if(S.tile_duration)
- if(S2) calc = S2.tile_duration - S.tile_duration
- if(S2 && calc > 0)
- text += "<b>Tile Duration: </b>[S.tile_duration] + [calc]<br>"
- else if(S2 && calc < 0)
- text += "<b>Tile Duration: </b>[S.tile_duration] - [-calc]<br>"
- else
- text += "<b>Tile Duration: </b>[S.tile_duration]<br>"
- else if(S2 && S2.tile_duration)
- text += "<b>Tile Duration: </b>0 + [S2.tile_duration]<br>"
- if(7)
- if(S.spell_range)
- if(S2) calc = S2.spell_range - S.spell_range
- if(S2 && calc > 0)
- text += "<b>Spell Range: </b>[S.spell_range] + [calc]<br>"
- else if(S2 && calc < 0)
- text += "<b>Spell Range: </b>[S.spell_range] - [-calc]<br>"
- else
- text += "<b>Spell Range: </b>[S.spell_range]<br>"
- else if(S2 && S2.spell_range)
- text += "<b>Spell Range: </b>0 + [S2.spell_range]<br>"
- I.pixel_x = 0
- I.pixel_y = -128
- I.maptext = text
- O.overlays += I
- I.pixel_x -= 2
- I.pixel_y += 2
- I.maptext = "<font color='white'>[text]"
- O.overlays += I
- O.screen_loc = "CENTER+1:8, CENTER-5:28"
- src.info = O
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement