// Function from file: mob_grab.dm public Obj_Item_Weapon_Grab(dynamic user = null, Mob_Living victim = null) : base((object)(user)) { // Warning: Super call was HERE! If anything above HERE is needed by the super call, it might break!; this.assailant = user; this.affecting = victim; this.hud = new Obj_Screen_Grab(this); this.hud.icon_state = "reinforce"; this.hud.name = "reinforce grab"; this.hud.master = this; this.affecting.grabbed_by.Add(this); return; }
// Function from file: mob_grab.dm public void s_click(Obj_Screen_Grab S = null) { if (!(this.affecting != null)) { return; } if (this.state == 4) { return; } if (Game13.time < this.last_upgrade + 40) { return; } if (!Lang13.Bool(this.assailant.canmove) || Lang13.Bool(this.assailant.lying)) { GlobalFuncs.qdel(this); return; } this.last_upgrade = Game13.time; if (this.state < 2) { if (!this.allow_upgrade) { return; } ((Ent_Static)this.assailant).visible_message("<span class='warning'>" + this.assailant + " grabs " + this.affecting + " aggressively!</span>"); this.state = 2; this.icon_state = "grabbed1"; } else if (this.state < 3) { if (this.affecting is Mob_Living_SimpleAnimal_Slime) { this.assailant.WriteMsg("<span class='warning'>You squeeze " + this.affecting + ", but nothing interesting happens!</span>"); return; } ((Ent_Static)this.assailant).visible_message(new Txt("<span class='warning'>").item(this.assailant).str(" moves ").his_her_its_their().str(" grip to ").item(this.affecting).str("'s neck!</span>").ToString()); this.state = 3; this.icon_state = "grabbed+1"; if (!(this.affecting.buckled != null)) { this.affecting.loc = this.assailant.loc; } GlobalFuncs.add_logs(this.assailant, this.affecting, "neck-grabbed"); this.hud.icon_state = "disarm/kill"; this.hud.name = "disarm/kill"; } else if (this.state < 4) { ((Ent_Static)this.assailant).visible_message(new Txt("<span class='danger'>").item(this.assailant).str(" starts to tighten ").his_her_its_their().str(" grip on ").item(this.affecting).str("'s neck!</span>").ToString()); this.hud.icon_state = "disarm/kill1"; this.state = 4; if (GlobalFuncs.do_after(this.assailant, 100, null, this.affecting)) { if (this.state == 5) { return; } if (!(this.affecting != null)) { GlobalFuncs.qdel(this); return; } if (!Lang13.Bool(this.assailant.canmove) || Lang13.Bool(this.assailant.lying)) { GlobalFuncs.qdel(this); return; } this.state = 5; ((Ent_Static)this.assailant).visible_message(new Txt("<span class='danger'>").item(this.assailant).str(" tightens ").his_her_its_their().str(" grip on ").item(this.affecting).str("'s neck!</span>").ToString()); GlobalFuncs.add_logs(this.assailant, this.affecting, "strangled"); ((Mob)this.assailant).changeNext_move(10); this.affecting.losebreath += 1; } else if (Lang13.Bool(this.assailant)) { ((Ent_Static)this.assailant).visible_message(new Txt("<span class='warning'>").item(this.assailant).str(" is unable to tighten ").his_her_its_their().str(" grip on ").item(this.affecting).str("'s neck!</span>").ToString()); this.hud.icon_state = "disarm/kill"; this.state = 3; } } return; }